class Purview::Parsers::Base

Attributes

opts[R]
table[R]

Public Class Methods

new(opts={}) click to toggle source
# File lib/purview/parsers/base.rb, line 4
def initialize(opts={})
  @opts = opts
  @table = table_opt
end

Public Instance Methods

parse(data) click to toggle source
# File lib/purview/parsers/base.rb, line 9
def parse(data)
  raise %{All "#{Base}(s)" must override the "parse" method}
end
validate(data) click to toggle source
# File lib/purview/parsers/base.rb, line 13
def validate(data)
  raise %{All "#{Base}(s)" must override the "validate" method}
end

Private Instance Methods

extract_headers(data) click to toggle source
# File lib/purview/parsers/base.rb, line 23
def extract_headers(data)
  raise %{All "#{Base}(s)" must override the "extract_headers" method}
end
extract_rows(data) click to toggle source
# File lib/purview/parsers/base.rb, line 27
def extract_rows(data)
  raise %{All "#{Base}(s)" must override the "extract_rows" method}
end
table_opt() click to toggle source
# File lib/purview/parsers/base.rb, line 31
def table_opt
  opts[:table]
end