Method: Fabulator::Core::Structurals::StateMachine#compile_xml

Defined in:
lib/fabulator/core/structurals/state_machine.rb

#compile_xml(xml, context = nil) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/fabulator/core/structurals/state_machine.rb', line 27

def compile_xml(xml, context = nil)
  super

  if @states.empty?
    s = State.new
    s.name = 'start'
    @states = { 'start' => s }
  end
end