Class: InstantApi::Controller::BuildIndex
- Inherits:
-
Object
- Object
- InstantApi::Controller::BuildIndex
- Defined in:
- lib/instant_api/controller/build_index.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.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(controller, model_class_name) ⇒ BuildIndex
constructor
A new instance of BuildIndex.
Constructor Details
#initialize(controller, model_class_name) ⇒ BuildIndex
Returns a new instance of BuildIndex.
6 7 8 9 |
# File 'lib/instant_api/controller/build_index.rb', line 6 def initialize(controller, model_class_name) @controller = controller @model_class_name = model_class_name end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
4 5 6 |
# File 'lib/instant_api/controller/build_index.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_index.rb', line 4 def model_class_name @model_class_name end |
Instance Method Details
#build ⇒ Object
11 12 13 |
# File 'lib/instant_api/controller/build_index.rb', line 11 def build controller.class_eval(&build_index) end |