Methods
Attributes
| [R] | name | |
| [R] | options |
Public Class methods
[ show source ]
# File lib/state.rb, line 6 6: def initialize(name, options={}) 7: @name, @options = name, options 8: end
Public Instance methods
[ show source ]
# File lib/state.rb, line 15
15: def entered(record)
16: afteractions = @options[:after]
17: return unless afteractions
18: Array(afteractions).each do |afteract|
19: record.send(:run_transition_action, afteract)
20: end
21: end
[ show source ]
# File lib/state.rb, line 10
10: def entering(record)
11: enteract = @options[:enter]
12: record.send(:run_transition_action, enteract) if enteract
13: end
[ show source ]
# File lib/state.rb, line 23
23: def exited(record)
24: exitact = @options[:exit]
25: record.send(:run_transition_action, exitact) if exitact
26: end