Class: StateFu::Executioner
Overview
class that handles executing stuff in the context of your 'object'
Instance Attribute Summary (collapse)
-
- (Object) object
readonly
Returns the value of attribute object.
-
- (Object) transition
readonly
Returns the value of attribute transition.
Instance Method Summary (collapse)
- - (Object) evaluate(method_name_or_proc)
-
- (Executioner) initialize(transition, &block)
constructor
A new instance of Executioner.
Constructor Details
- (Executioner) initialize(transition, &block)
A new instance of Executioner
10 11 12 13 14 |
# File 'lib/executioner.rb', line 10 def initialize transition, &block @transition = transition @object = transition.object self end |
Instance Attribute Details
- (Object) object (readonly)
Returns the value of attribute object
8 9 10 |
# File 'lib/executioner.rb', line 8 def object @object end |
- (Object) transition (readonly)
Returns the value of attribute transition
8 9 10 |
# File 'lib/executioner.rb', line 8 def transition @transition end |
Instance Method Details
- (Object) evaluate(method_name_or_proc)
16 17 18 19 |
# File 'lib/executioner.rb', line 16 def evaluate method_name_or_proc args = [transition, transition.arguments] evaluate_with_arguments(method_name_or_proc, *args) end |