Method: Colloquy::FlowParser::InstanceMethods#switch

Defined in:
lib/colloquy/flow_parser.rb

#switch(node, options = {}) ⇒ Object



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/colloquy/flow_parser.rb', line 108

def switch(node, options = {})
  if node == :back
    raise_jump_exception(Colloquy::SwitchBackJump)
  end
  
  if options[:flow]
    raise_jump_exception(Colloquy::SwitchFlowJump, { :node => node, :flow => options[:flow] })
  end
  
  raise_jump_exception(Colloquy::SwitchJump, node)
end