Class: MR::Factory::ModelStack
- Inherits:
-
Object
- Object
- MR::Factory::ModelStack
- Defined in:
- lib/mr/factory/model_stack.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #create ⇒ Object
- #create_dependencies ⇒ Object (also: #create_deps)
- #destroy ⇒ Object
- #destroy_dependencies ⇒ Object (also: #destroy_deps)
- #factory_config ⇒ Object
-
#initialize(model, factory_config) ⇒ ModelStack
constructor
A new instance of ModelStack.
Constructor Details
#initialize(model, factory_config) ⇒ ModelStack
Returns a new instance of ModelStack.
11 12 13 14 |
# File 'lib/mr/factory/model_stack.rb', line 11 def initialize(model, factory_config) @model = model @record_stack = MR::Factory::RecordStack.for_record(model.record, factory_config) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
9 10 11 |
# File 'lib/mr/factory/model_stack.rb', line 9 def model @model end |
Instance Method Details
#create ⇒ Object
18 |
# File 'lib/mr/factory/model_stack.rb', line 18 def create; @record_stack.create; end |
#create_dependencies ⇒ Object Also known as: create_deps
21 |
# File 'lib/mr/factory/model_stack.rb', line 21 def create_dependencies; @record_stack.create_dependencies; end |
#destroy ⇒ Object
19 |
# File 'lib/mr/factory/model_stack.rb', line 19 def destroy; @record_stack.destroy; end |
#destroy_dependencies ⇒ Object Also known as: destroy_deps
24 |
# File 'lib/mr/factory/model_stack.rb', line 24 def destroy_dependencies; @record_stack.destroy_dependencies; end |
#factory_config ⇒ Object
16 |
# File 'lib/mr/factory/model_stack.rb', line 16 def factory_config; @record_stack.factory_config; end |