Class: UIC::Application::StateMachine::VisualState
- Inherits:
-
Object
- Object
- UIC::Application::StateMachine::VisualState
- Includes:
- ElementBacked
- Defined in:
- lib/ruic/statemachine.rb
Instance Attribute Summary collapse
-
#el ⇒ Nokogiri::XML::Element
readonly
The Nokogiri element in the
.uia
representing this visual state. -
#machine ⇒ Application::StateMachine
readonly
The state machine containing the referenced state.
-
#ref ⇒ String
The
id
of the state in the state machine whose enter/exit will trigger the attached visual actions.
Attributes included from ElementBacked
Instance Method Summary collapse
- #enter_actions ⇒ Object
- #exit_actions ⇒ Object
-
#initialize(el, machine) ⇒ VisualState
constructor
A new instance of VisualState.
Constructor Details
#initialize(el, machine) ⇒ VisualState
Returns a new instance of VisualState.
128 129 130 131 |
# File 'lib/ruic/statemachine.rb', line 128 def initialize(el,machine) @el = el @machine = machine end |
Instance Attribute Details
#el ⇒ Nokogiri::XML::Element (readonly)
Returns the Nokogiri element in the .uia
representing this visual state.
123 124 125 |
# File 'lib/ruic/statemachine.rb', line 123 def el @el end |
#machine ⇒ Application::StateMachine (readonly)
Returns the state machine containing the referenced state.
126 127 128 |
# File 'lib/ruic/statemachine.rb', line 126 def machine @machine end |
#ref ⇒ String
Returns the id
of the state in the state machine whose enter/exit will trigger the attached visual actions.
120 |
# File 'lib/ruic/statemachine.rb', line 120 xmlattribute :ref |
Instance Method Details
#enter_actions ⇒ Object
133 134 135 |
# File 'lib/ruic/statemachine.rb', line 133 def enter_actions @el.xpath('xmlns:enter/*').to_a.map{ |el| VisualAction.create(el,self) } end |
#exit_actions ⇒ Object
137 138 139 |
# File 'lib/ruic/statemachine.rb', line 137 def exit_actions @el.xpath('xmlns:exit/*').to_a.map{ |el| VisualAction.create(el,self) } end |