# File lib/state_machine/state.rb, line 189 def call(object, method, *args, &block) if context_method = methods[method.to_sym] # Method is defined by the state: proxy it through context_method.bind(object).call(*args, &block) else # Raise exception as if the method never existed on the original object raise NoMethodError, "undefined method '#{method}' for #{object} with #{name || 'nil'} #{machine.name}" end end