Class: Purview::Parsers::Base

Inherits:
Object
  • Object
show all
Includes:
Mixins::Logger
Defined in:
lib/purview/parsers/base.rb

Direct Known Subclasses

CSV, SQL

Instance Method Summary collapse

Methods included from Mixins::Logger

#logger, #logger_opts, #logger_type, #with_context_logging

Constructor Details

#initialize(opts = {}) ⇒ Base

Returns a new instance of Base.



4
5
6
7
# File 'lib/purview/parsers/base.rb', line 4

def initialize(opts={})
  @opts = opts
  @table = table_opt
end

Instance Method Details

#parse(data) ⇒ Object



9
10
11
# File 'lib/purview/parsers/base.rb', line 9

def parse(data)
  raise %{All "#{Base}(s)" must override the "parse" method}
end

#validate(data) ⇒ Object



13
14
15
# File 'lib/purview/parsers/base.rb', line 13

def validate(data)
  raise %{All "#{Base}(s)" must override the "validate" method}
end