Class: ECCSV::InsertCorrection

Inherits:
Correction show all
Defined in:
lib/eccsv/correction.rb

Instance Attribute Summary collapse

Attributes inherited from Correction

#col, #line

Instance Method Summary collapse

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

#stringObject (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

#lengthObject



23
24
25
# File 'lib/eccsv/correction.rb', line 23

def length
  @string.length
end