Class: Norma43::LineHandlers::Handler

Inherits:
Struct
  • Object
show all
Defined in:
lib/norma43/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



45
46
47
# File 'lib/norma43/line_handlers.rb', line 45

def parser
  @parser
end

#processorObject

Returns the value of attribute processor

Returns:

  • (Object)

    the current value of processor



45
46
47
# File 'lib/norma43/line_handlers.rb', line 45

def processor
  @processor
end

Instance Method Details

#process(line, contexts) ⇒ Object



46
47
48
49
50
# File 'lib/norma43/line_handlers.rb', line 46

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

  processor.call line_parser, contexts
end