Class: ReciteCSV::Row::Base
- Inherits:
-
Object
- Object
- ReciteCSV::Row::Base
- Defined in:
- lib/recite_csv/row/base.rb
Instance Attribute Summary collapse
-
#_raw_data ⇒ Object
readonly
Returns the value of attribute _raw_data.
Class Method Summary collapse
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(raw_data) ⇒ Base
constructor
A new instance of Base.
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_data ⇒ Object (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
.new ⇒ Object
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 |