Class: WebFlow::Event

Inherits:
Object
  • Object
show all
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

SystemEvent

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



49
50
51
# File 'lib/webflow/event.rb', line 49

def name
  @name
end