Class: Bismas::Parser::Legacy

Inherits:
Bismas::Parser show all
Defined in:
lib/bismas/parser.rb

Overview

Legacy version of Parser that more closely mimics the behaviour of the original BISMAS software. Deviations from Parser:

  1. Records are not required to start with 0x01, any character will do.
  2. Category numbers are extended to any character except 0x0D 0x0A. [NOT IMPLEMENTED YET]

Instance Method Summary collapse

Methods inherited from Bismas::Parser

parse, #parse, #parse_field, #parse_record

Constructor Details

#initialize(options = {}) ⇒ Legacy

Returns a new instance of Legacy.

Raises:

  • (NotImplementedError)


58
59
60
61
62
63
64
# File 'lib/bismas/parser.rb', line 58

def initialize(options = {})
  raise NotImplementedError, 'not implemented yet'

  @category_char = '.'
  super
  @regex[:category] = /#{@regex[:category]}(?<!#{@chars[:newline]})/
end