Class: TotalIn::LineHandlers::Handler

Inherits:
Struct
  • Object
show all
Defined in:
lib/total_in/line_handlers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parserObject

Returns the value of attribute parser

Returns:

  • (Object)

    the current value of parser



91
92
93
# File 'lib/total_in/line_handlers.rb', line 91

def parser
  @parser
end

#processorObject

Returns the value of attribute processor

Returns:

  • (Object)

    the current value of processor



91
92
93
# File 'lib/total_in/line_handlers.rb', line 91

def processor
  @processor
end

Instance Method Details

#process(line, contexts) ⇒ Object



92
93
94
95
96
# File 'lib/total_in/line_handlers.rb', line 92

def process line, contexts
  line_parser = self.parser.new(line)

  processor.call line_parser, contexts
end