Class: InstantApi::Controller::BuildResource
- Inherits:
-
Object
- Object
- InstantApi::Controller::BuildResource
- Defined in:
- lib/instant_api/controller/build_resource.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(controller, model_class_name) ⇒ BuildResource
constructor
A new instance of BuildResource.
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
#build ⇒ Object
7 8 9 |
# File 'lib/instant_api/controller/build_resource.rb', line 7 def build @controller.class_eval(&build_resource) end |