Class: ECCSV::DeleteCorrection

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

Instance Attribute Summary

Attributes inherited from Correction

#col, #line

Instance Method Summary collapse

Constructor Details

#initialize(line, col, amount) ⇒ DeleteCorrection

Returns a new instance of DeleteCorrection.



33
34
35
36
# File 'lib/eccsv/correction.rb', line 33

def initialize(line, col, amount)
  super
  @amount = amount
end

Instance Method Details

#apply(stream) ⇒ Object



38
39
40
# File 'lib/eccsv/correction.rb', line 38

def apply(stream)
  stream.delete(@amount, @line, @col)
end