class Orchestra::DSL::ClassAdapter

Public Instance Methods

execute(state, maybe_item = nil) click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 85
def execute state, maybe_item = nil
  instance = Invokr.inject object, :using => state
  args = [method_name]
  args << maybe_item if collection?
  instance.public_send *args
end
object_method() click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 92
def object_method
  Invokr.query_method object.instance_method :initialize
end
validate!() click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 79
def validate!
  return if object.instance_methods.include? method_name
  raise NotImplementedError,
    "#{object} does not implement instance method `#{method_name}'"
end