Class: CsvBuilder::Yielder
- Inherits:
-
Object
- Object
- CsvBuilder::Yielder
- Defined in:
- lib/csv_streamer/template_handler.rb
Instance Method Summary collapse
- #<<(data) ⇒ Object
- #eof? ⇒ Boolean
-
#initialize(stream_proc) ⇒ Yielder
constructor
A new instance of Yielder.
- #pos ⇒ Object
- #read(arg1) ⇒ Object
- #rewind ⇒ Object
Constructor Details
#initialize(stream_proc) ⇒ Yielder
Returns a new instance of Yielder.
6 7 8 |
# File 'lib/csv_streamer/template_handler.rb', line 6 def initialize(stream_proc) @stream_proc = stream_proc end |
Instance Method Details
#<<(data) ⇒ Object
25 26 27 |
# File 'lib/csv_streamer/template_handler.rb', line 25 def <<(data) @stream_proc.call data end |
#eof? ⇒ Boolean
14 15 16 |
# File 'lib/csv_streamer/template_handler.rb', line 14 def eof? return true end |
#pos ⇒ Object
10 11 12 |
# File 'lib/csv_streamer/template_handler.rb', line 10 def pos return 0 end |
#read(arg1) ⇒ Object
21 22 23 |
# File 'lib/csv_streamer/template_handler.rb', line 21 def read(arg1) return "\n" end |
#rewind ⇒ Object
18 19 |
# File 'lib/csv_streamer/template_handler.rb', line 18 def rewind end |