Class Object
In: lib/statemachine/action_invokation.rb
Parent: Object

Methods

Included Modules

InstanceExecHelper

Classes and Modules

Module Object::InstanceExecHelper

Public Instance methods

[Source]

    # File lib/statemachine/action_invokation.rb, line 53
53:   def instance_exec(*args, &block) # !> method redefined; discarding old instance_exec
54:     mname = "__instance_exec_#{Thread.current.object_id.abs}_#{object_id.abs}"
55:     InstanceExecHelper.module_eval{ define_method(mname, &block) }
56:     begin
57:       ret = send(mname, *args)
58:     ensure
59:       InstanceExecHelper.module_eval{ undef_method(mname) } rescue nil
60:     end
61:     ret
62:   end

[Validate]