Class: Tb::CSVReader
- Inherits:
-
Object
- Object
- Tb::CSVReader
- Defined in:
- lib/tb/csv.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(input) ⇒ CSVReader
constructor
A new instance of CSVReader.
- #shift ⇒ Object
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
#each ⇒ Object
80 81 82 83 84 85 |
# File 'lib/tb/csv.rb', line 80 def each while ary = self.shift yield ary end nil end |
#shift ⇒ Object
76 77 78 |
# File 'lib/tb/csv.rb', line 76 def shift @csv.shift end |