Method: FiniteMachine::Definition.method_missing

Defined in:
lib/finite_machine/definition.rb

.method_missing(method_name, *arguments, &block) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Delay lookup of DSL method

Parameters:

  • method_name (Symbol)

    the method name

  • arguments (Array)

    the method arguments



99
100
101
102
103
104
105
# File 'lib/finite_machine/definition.rb', line 99

def self.method_missing(method_name, *arguments, &block)
  deferred = proc do |name, args, blok, object|
    object.send(name, *args, &blok)
  end
  deferred = deferred.curry(4)[method_name][arguments][block]
  add_deferred(deferred)
end