Module: Colloquy::FlowParser::ClassMethods

Defined in:
lib/colloquy/flow_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arguments, &block) ⇒ Object



302
303
304
305
306
307
308
309
310
# File 'lib/colloquy/flow_parser.rb', line 302

def method_missing(method, *arguments, &block)
  @node_definitions ||= []

  identifier = method
  options = arguments.first || {}
  payload = block

  @node_definitions << { :identifier => method, :options => options, :payload => payload }
end

Instance Attribute Details

#node_definitionsObject

Returns the value of attribute node_definitions.



300
301
302
# File 'lib/colloquy/flow_parser.rb', line 300

def node_definitions
  @node_definitions
end