Class: ArcFurnace::PassthroughSink

Inherits:
Sink
  • Object
show all
Defined in:
lib/arc-furnace/passthrough_sink.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Sink

#prepare

Constructor Details

#initialize(options = {}) ⇒ PassthroughSink

Returns a new instance of PassthroughSink.



6
7
8
# File 'lib/arc-furnace/passthrough_sink.rb', line 6

def initialize(options = {})
  @collection = Set.new
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



4
5
6
# File 'lib/arc-furnace/passthrough_sink.rb', line 4

def collection
  @collection
end

Instance Method Details

#finalizeObject



10
11
12
# File 'lib/arc-furnace/passthrough_sink.rb', line 10

def finalize
  collection.to_a
end

#row(object) ⇒ Object



14
15
16
# File 'lib/arc-furnace/passthrough_sink.rb', line 14

def row(object)
  collection << object
end