Class: ECCSV::InsertCorrection
- Inherits:
-
Correction
- Object
- Correction
- ECCSV::InsertCorrection
- Defined in:
- lib/eccsv/correction.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Attributes inherited from Correction
Instance Method Summary collapse
- #apply(stream) ⇒ Object
-
#initialize(line, col, string) ⇒ InsertCorrection
constructor
A new instance of InsertCorrection.
- #length ⇒ Object
Constructor Details
#initialize(line, col, string) ⇒ InsertCorrection
18 19 20 21 |
# File 'lib/eccsv/correction.rb', line 18 def initialize(line, col, string) super @string = string end |
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
16 17 18 |
# File 'lib/eccsv/correction.rb', line 16 def string @string end |
Instance Method Details
#apply(stream) ⇒ Object
27 28 29 |
# File 'lib/eccsv/correction.rb', line 27 def apply(stream) stream.insert(@string, @line, @col) end |
#length ⇒ Object
23 24 25 |
# File 'lib/eccsv/correction.rb', line 23 def length @string.length end |