Class: CsvBuilder::Yielder

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_builder/template_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream_proc) ⇒ Yielder

Returns a new instance of Yielder.



6
7
8
# File 'lib/csv_builder/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_builder/template_handler.rb', line 25

def <<(data)
  @stream_proc.call data
end

#eof?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/csv_builder/template_handler.rb', line 14

def eof?
  return true
end

#posObject



10
11
12
# File 'lib/csv_builder/template_handler.rb', line 10

def pos
  return 0
end

#read(arg1) ⇒ Object



21
22
23
# File 'lib/csv_builder/template_handler.rb', line 21

def read(arg1)
  return "\n"
end

#rewindObject



18
19
# File 'lib/csv_builder/template_handler.rb', line 18

def rewind
end