Class: Hifsm::Event
Constant Summary collapse
- CALLBACKS =
[:before, :after, :guard].freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #guard?(target, *args) ⇒ Boolean
-
#initialize(name, to, callbacks_options) ⇒ Event
constructor
A new instance of Event.
Methods included from Callbacks
#set_callbacks, #trigger, #trigger?
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/hifsm/event.rb', line 7 def name @name end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
7 8 9 |
# File 'lib/hifsm/event.rb', line 7 def to @to end |
Instance Method Details
#guard?(target, *args) ⇒ Boolean
17 18 19 |
# File 'lib/hifsm/event.rb', line 17 def guard?(target, *args) trigger?(:guard, target, *args) end |