Class: PTJ::Parser::FileParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ptj/parser/fileparser.rb

Instance Method Summary collapse

Instance Method Details

#parse_line(line) ⇒ Object

Parse a file line-by-line and return the necessary results.

Parameters:

  • line

    Individual line of the file.

Returns:

  • Hash :mypass => value, :myhash => value, :count => value (optional)

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/ptj/parser/fileparser.rb', line 12

def parse_line(line)
  raise(NotImplementedError, "This is an abstract implementation, you must override parse_line")
end

#total_count(file) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/ptj/parser/fileparser.rb', line 16

def total_count(file)
  raise(NotImplementedError, "This is an abstract implementation, you must override parse_line")
end