Class: Orchestra::DSL::ObjectContext
- Inherits:
-
Object
- Object
- Orchestra::DSL::ObjectContext
- Defined in:
- lib/orchestra/dsl/object_adapter.rb
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#initialize(adapter, state) ⇒ ObjectContext
constructor
A new instance of ObjectContext.
Constructor Details
#initialize(adapter, state) ⇒ ObjectContext
Returns a new instance of ObjectContext.
127 128 129 130 131 132 133 134 |
# File 'lib/orchestra/dsl/object_adapter.rb', line 127 def initialize adapter, state @__adapter__ = adapter @__state__ = state return unless adapter.collection? self.singleton_class.send :define_method, :fetch_collection do @__state__.fetch adapter.collection end end |
Instance Method Details
#execute(*args) ⇒ Object
136 137 138 |
# File 'lib/orchestra/dsl/object_adapter.rb', line 136 def execute *args @__adapter__.execute @__state__, *args end |