Class: WebFlow::Event
- Inherits:
-
Object
- Object
- WebFlow::Event
- Defined in:
- lib/webflow/event.rb
Overview
This class is used by steps to return an event descriptor to the WebFlow framework.
Use it as :
def step_definition
(...)
WebFlow::Event.new(:success)
end
There is also a sugar method included in WebFlow::Base which simplifies the event returning process.
def step_definition
(...)
event :success
end
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(m_event_name) ⇒ Event
constructor
Initializes the class instance.
Constructor Details
#initialize(m_event_name) ⇒ Event
Initializes the class instance
52 53 54 55 56 57 |
# File 'lib/webflow/event.rb', line 52 def initialize(m_event_name) # The name of the event returned @name = m_event_name.to_s end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
49 50 51 |
# File 'lib/webflow/event.rb', line 49 def name @name end |