Class: InstantApi::Controller::BuildUpdate
- Inherits:
-
Object
- Object
- InstantApi::Controller::BuildUpdate
- Defined in:
- lib/instant_api/controller/build_update.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#model_class_name ⇒ Object
readonly
Returns the value of attribute model_class_name.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(controller, model_class_name) ⇒ BuildUpdate
constructor
A new instance of BuildUpdate.
Constructor Details
#initialize(controller, model_class_name) ⇒ BuildUpdate
Returns a new instance of BuildUpdate.
6 7 8 9 10 |
# File 'lib/instant_api/controller/build_update.rb', line 6 def initialize(controller, model_class_name) @controller = controller @model_class_name = model_class_name @model_name = model_class_name.underscore end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
4 5 6 |
# File 'lib/instant_api/controller/build_update.rb', line 4 def controller @controller end |
#model_class_name ⇒ Object (readonly)
Returns the value of attribute model_class_name.
4 5 6 |
# File 'lib/instant_api/controller/build_update.rb', line 4 def model_class_name @model_class_name end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
4 5 6 |
# File 'lib/instant_api/controller/build_update.rb', line 4 def model_name @model_name end |
Instance Method Details
#build ⇒ Object
12 13 14 15 |
# File 'lib/instant_api/controller/build_update.rb', line 12 def build controller.class_eval(&build_update) controller.class_eval(&build_check_strong_parameters) end |