Method: Colloquy::FlowParser::InstanceMethods#initialize
- Defined in:
- lib/colloquy/flow_parser.rb
#initialize(flow_name = nil, options = {}) ⇒ Object
Initializes the flow
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/colloquy/flow_parser.rb', line 23 def initialize(flow_name = nil, = {}) @flow_name = flow_name.to_sym if flow_name @logger = [:logger] || Logger.new(STDOUT) @session = HashWithIndifferentAccess.new([:session] || {}) @messages = [:messages] || {} @headers = {} self.state = [:state] @nodes = [:nodes] || [] setup if self.class.method_defined?(:setup) create_nodes_from_definitions! if @nodes.empty? end |