Sha256: 95f40aee0e9e60011413e2fcdcc1e34fdfd165c6b2be79f486983d1beca5dd0e
Contents?: true
Size: 987 Bytes
Versions: 37
Compression:
Stored size: 987 Bytes
Contents
require 'arc-furnace/node' module ArcFurnace class Source < Node extend Forwardable # Called to prepare anything this source needs to do before providing rows. # For instance, opening a source file or database connection. def prepare end # Advance this source by one, returning the row as a hash def row result = value advance result end # Called at the end of processing, do any clean-up or state-saving here. def finalize end # Is this source empty? def empty? raise 'Unimplemented' end # The current value this source points at # This is generally the only method required to implement a source. def value raise 'Unimplemented' end # Close the source. Called by the framework at the end of processing. def close end # Advance this source by one. #advance specifies no return value contract def advance raise 'Unimplemented' end end end
Version data entries
37 entries across 37 versions & 1 rubygems