Class: UIC::Application::StateMachine::VisualAction
- Inherits:
-
Object
- Object
- UIC::Application::StateMachine::VisualAction
- Includes:
- ElementBacked
- Defined in:
- lib/ruic/statemachine.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Call, FireEvent, Generic, GotoSlide, SetAttribute
Instance Attribute Summary collapse
-
#el ⇒ Nokogiri::XML::Element
readonly
The Nokogiri element representing this action in the
.uia
. -
#element ⇒ UIC::MetaData::AssetBase
The element in a UIC presentation affected by this action.
-
#machine ⇒ Application::StateMachine
readonly
The state machine triggering this action.
-
#owner ⇒ VisualState, VisualTransition
readonly
The visual state or transition wrapping this action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(el, owner) ⇒ VisualAction
constructor
A new instance of VisualAction.
Constructor Details
#initialize(el, owner) ⇒ VisualAction
Returns a new instance of VisualAction.
191 192 193 194 195 |
# File 'lib/ruic/statemachine.rb', line 191 def initialize(el,owner) @el = el @owner = owner @machine = owner.machine end |
Instance Attribute Details
#el ⇒ Nokogiri::XML::Element (readonly)
Returns the Nokogiri element representing this action in the .uia
.
172 173 174 |
# File 'lib/ruic/statemachine.rb', line 172 def el @el end |
#element ⇒ UIC::MetaData::AssetBase
Returns the element in a UIC presentation affected by this action.
169 |
# File 'lib/ruic/statemachine.rb', line 169 xmlattribute(:element, lambda{ |path,action| (action.machine.app / path) }){ |element| element.path } |
#machine ⇒ Application::StateMachine (readonly)
Returns the state machine triggering this action.
178 179 180 |
# File 'lib/ruic/statemachine.rb', line 178 def machine @machine end |
#owner ⇒ VisualState, VisualTransition (readonly)
Returns the visual state or transition wrapping this action.
175 176 177 |
# File 'lib/ruic/statemachine.rb', line 175 def owner @owner end |
Class Method Details
.create(el, owner) ⇒ Object
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/ruic/statemachine.rb', line 180 def self.create(el,owner) klass = case el.name when 'goto-slide' then GotoSlide when 'call' then Call when 'set-attribute' then SetAttribute when 'fire-event' then FireEvent else Generic end klass.new(el,owner) end |