class Cloaca::Operations::RemoveSequentialRows
Public Class Methods
new( ending_row_offset:, input:, output:, starting_row_offset:, ** )
click to toggle source
# File lib/cloaca/operations/remove_sequential_rows.rb, line 4 def initialize( ending_row_offset:, input:, output:, starting_row_offset:, ** ) @starting_row_offset = starting_row_offset @ending_row_offset = ending_row_offset @input = input @output = output end
Public Instance Methods
run!()
click to toggle source
# File lib/cloaca/operations/remove_sequential_rows.rb, line 17 def run! @input.each_with_index do |line, index| if index < @starting_row_offset || index >= @ending_row_offset @output << line end end end