Class: UIC::Application::StateMachine::VisualTransition

Inherits:
Object
  • Object
show all
Includes:
ElementBacked
Defined in:
lib/ruic/statemachine.rb

Instance Attribute Summary collapse

Attributes included from ElementBacked

#owner

Instance Method Summary collapse

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

#elNokogiri::XML::Element (readonly)

Returns the Nokogiri element in the .uia representing this visual state.

Returns:

  • (Nokogiri::XML::Element)

    the Nokogiri element in the .uia representing this visual state.



150
151
152
# File 'lib/ruic/statemachine.rb', line 150

def el
  @el
end

#machineApplication::StateMachine (readonly)

Returns the state machine containing the referenced state.

Returns:



153
154
155
# File 'lib/ruic/statemachine.rb', line 153

def machine
  @machine
end

#refString

Returns the uic:id of the transition that will trigger the attached visual actions.

Returns:

  • (String)

    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

#actionsObject



159
160
161
# File 'lib/ruic/statemachine.rb', line 159

def actions
	@el.xpath('./*').to_a.map{ |el| VisualAction.create(el,self) }
end