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.
66 67 68 |
# File 'lib/tb/csv.rb', line 66 def initialize(input) @csv = CSV.new(input) end |
Instance Method Details
#each ⇒ Object
74 75 76 77 78 79 |
# File 'lib/tb/csv.rb', line 74 def each while ary = self.shift yield ary end nil end |
#shift ⇒ Object
70 71 72 |
# File 'lib/tb/csv.rb', line 70 def shift @csv.shift end |