Class: CsvPiper::Errors::Row
- Inherits:
-
Object
- Object
- CsvPiper::Errors::Row
- Extended by:
- Forwardable
- Defined in:
- lib/csv_piper/errors/row.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#row_index ⇒ Object
readonly
Returns the value of attribute row_index.
Instance Method Summary collapse
- #add(key, error) ⇒ Object
-
#initialize(row_index) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(row_index) ⇒ Row
Returns a new instance of Row.
9 10 11 12 |
# File 'lib/csv_piper/errors/row.rb', line 9 def initialize(row_index) @row_index = row_index @errors = Hash.new { [].freeze } end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/csv_piper/errors/row.rb', line 7 def errors @errors end |
#row_index ⇒ Object (readonly)
Returns the value of attribute row_index.
7 8 9 |
# File 'lib/csv_piper/errors/row.rb', line 7 def row_index @row_index end |
Instance Method Details
#add(key, error) ⇒ Object
14 15 16 |
# File 'lib/csv_piper/errors/row.rb', line 14 def add(key, error) @errors[key] += [error] end |