Class: AwDatapipe::ObjectHash
- Inherits:
-
Hash
- Object
- Hash
- AwDatapipe::ObjectHash
- Defined in:
- lib/aw_datapipe/object_hash.rb
Overview
A symbol table implemeted as a hash of objects keyed by their ids.
Instance Method Summary collapse
-
#append(*objects) ⇒ Object
(also: #<<)
Adds PipelineObjects to the symbol table along with any of their dependencies.
-
#initialize(*objects) ⇒ ObjectHash
constructor
A new instance of ObjectHash.
Constructor Details
#initialize(*objects) ⇒ ObjectHash
Returns a new instance of ObjectHash.
4 5 6 7 |
# File 'lib/aw_datapipe/object_hash.rb', line 4 def initialize(*objects) super() self.append(*objects) end |
Instance Method Details
#append(*objects) ⇒ Object Also known as: <<
Adds PipelineObjects to the symbol table along with any of their dependencies.
11 12 13 14 |
# File 'lib/aw_datapipe/object_hash.rb', line 11 def append(*objects) objects.each { |object| self[object.id] = object } self end |