Class: InstantApi::Controller::BuildCreate

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, model_class_name) ⇒ BuildCreate

Returns a new instance of BuildCreate.



6
7
8
# File 'lib/instant_api/controller/build_create.rb', line 6

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

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



4
5
6
# File 'lib/instant_api/controller/build_create.rb', line 4

def controller
  @controller
end

#model_class_nameObject (readonly)

Returns the value of attribute model_class_name.



4
5
6
# File 'lib/instant_api/controller/build_create.rb', line 4

def model_class_name
  @model_class_name
end

Instance Method Details

#buildObject



10
11
12
# File 'lib/instant_api/controller/build_create.rb', line 10

def build
  controller.class_eval(&build_create)
end