Class: ReciteCSV::Row::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/recite_csv/row/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_data) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/recite_csv/row/base.rb', line 8

def initialize(raw_data)
  @_raw_data = raw_data
end

Instance Attribute Details

#_raw_dataObject (readonly)

Returns the value of attribute _raw_data.



6
7
8
# File 'lib/recite_csv/row/base.rb', line 6

def _raw_data
  @_raw_data
end

Class Method Details

.newObject



16
17
18
19
20
21
22
# File 'lib/recite_csv/row/base.rb', line 16

def self.new(*)
  if self == Base
    raise ::NotImplementedError,
          "#{self} is an abstract class and cannot be instantiated."
  end
  super
end

Instance Method Details

#[](key) ⇒ Object



12
13
14
# File 'lib/recite_csv/row/base.rb', line 12

def [](key)
  self._raw_data[key]
end