code: func (rd *Resource) addMethod(r *raml.Resource, m *raml.Method, methodName string) {
  	if m == nil {
  		return
  	}
  	rd.Methods = append(rd.Methods, newMethod(r, rd, m, methodName))
  }
docs: // add a method to resource definition