# File lib/state_machine/eval_helpers.rb, line 53 def evaluate_method(object, method, *args) case method when Symbol object.method(method).arity == 0 ? object.send(method) : object.send(method, *args) when Proc, Method args.unshift(object) [0, 1].include?(method.arity) ? method.call(*args.slice(0, method.arity)) : method.call(*args) when String eval(method, object.instance_eval {binding}) else raise ArgumentError, 'Methods must be a symbol denoting the method to call, a block to be invoked, or a string to be evaluated' end end