Class: InstantApi::Controller::BuildResource

Inherits:
Object
  • Object
show all
Defined in:
lib/instant_api/controller/build_resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(controller, model_class_name) ⇒ BuildResource

Returns a new instance of BuildResource.



3
4
5
# File 'lib/instant_api/controller/build_resource.rb', line 3

def initialize(controller, model_class_name)
  @controller, @model_class_name = controller, model_class_name
end

Instance Method Details

#buildObject



7
8
9
# File 'lib/instant_api/controller/build_resource.rb', line 7

def build
  @controller.class_eval(&build_resource)
end