class UIC::Application::StateMachine::UIC::Application::StateMachine::UIC::Application::StateMachine::VisualStates
Public Class Methods
new(app_machine,visuals_el)
click to toggle source
# File lib/ruic/statemachine.rb, line 75 def initialize(app_machine,visuals_el) @machine = app_machine @wrap = visuals_el @by_el = {} end
Public Instance Methods
[](id)
click to toggle source
# File lib/ruic/statemachine.rb, line 83 def [](id) if el=@wrap.at("xmlns:state[@ref='#{id}']") @by_el[el] ||= VisualState.new(el,@machine) end end
each() { |by_el ||= visual_state| ... }
click to toggle source
# File lib/ruic/statemachine.rb, line 80 def each @wrap.xpath('xmlns:state').each{ |el| yield @by_el[el] ||= VisualState.new(el,@machine) } end
length()
click to toggle source
# File lib/ruic/statemachine.rb, line 88 def length @wrap.xpath('count(xmlns:state)').to_i end
Also aliased as: count