Class: UIC::Application::StateMachine::VisualTransition
- Inherits:
-
Object
- Object
- UIC::Application::StateMachine::VisualTransition
- 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
uic:id
of the transition that will trigger the attached visual actions.
Attributes included from ElementBacked
Instance Method Summary collapse
- #actions ⇒ Object
-
#initialize(el, machine) ⇒ VisualTransition
constructor
A new instance of VisualTransition.
Constructor Details
#initialize(el, machine) ⇒ VisualTransition
Returns a new instance of VisualTransition.
155 156 157 158 |
# File 'lib/ruic/statemachine.rb', line 155 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.
150 151 152 |
# File 'lib/ruic/statemachine.rb', line 150 def el @el end |
#machine ⇒ Application::StateMachine (readonly)
Returns the state machine containing the referenced state.
153 154 155 |
# File 'lib/ruic/statemachine.rb', line 153 def machine @machine end |
#ref ⇒ String
Returns the uic:id
of the transition that will trigger the attached visual actions.
147 |
# File 'lib/ruic/statemachine.rb', line 147 xmlattribute :ref |
Instance Method Details
#actions ⇒ Object
159 160 161 |
# File 'lib/ruic/statemachine.rb', line 159 def actions @el.xpath('./*').to_a.map{ |el| VisualAction.create(el,self) } end |