class ArcFurnace::Source
Public Instance Methods
advance()
click to toggle source
Advance this source by one. advance
specifies no return value contract
# File lib/arc-furnace/source.rb, line 42 def advance raise 'Unimplemented' end
close()
click to toggle source
Close the source. Called by the framework at the end of processing.
# File lib/arc-furnace/source.rb, line 37 def close end
empty?()
click to toggle source
Is this source empty?
# File lib/arc-furnace/source.rb, line 26 def empty? raise 'Unimplemented' end
finalize()
click to toggle source
Called at the end of processing, do any clean-up or state-saving here.
# File lib/arc-furnace/source.rb, line 21 def finalize end
prepare()
click to toggle source
Called to prepare anything this source needs to do before providing rows. For instance, opening a source file or database connection.
# File lib/arc-furnace/source.rb, line 9 def prepare end
row()
click to toggle source
Advance this source by one, returning the row as a hash
# File lib/arc-furnace/source.rb, line 14 def row result = value advance result end
value()
click to toggle source
The current value this source points at This is generally the only method required to implement a source.
# File lib/arc-furnace/source.rb, line 32 def value raise 'Unimplemented' end