Class: Tb::CSVReader

Inherits:
Object
  • Object
show all
Defined in:
lib/tb/csv.rb

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ CSVReader

Returns a new instance of CSVReader.



72
73
74
# File 'lib/tb/csv.rb', line 72

def initialize(input)
  @csv = CSV.new(input)
end

Instance Method Details

#eachObject



80
81
82
83
84
85
# File 'lib/tb/csv.rb', line 80

def each
  while ary = self.shift
    yield ary
  end
  nil
end

#shiftObject



76
77
78
# File 'lib/tb/csv.rb', line 76

def shift
  @csv.shift
end