Class: MemDB::Bucket
- Inherits:
-
Object
- Object
- MemDB::Bucket
- Defined in:
- lib/mem_db/bucket.rb
Instance Method Summary collapse
- #add(_obj, value) ⇒ Object
-
#initialize ⇒ Bucket
constructor
A new instance of Bucket.
- #query(_query, out:) ⇒ Object
Constructor Details
#initialize ⇒ Bucket
Returns a new instance of Bucket.
5 6 7 |
# File 'lib/mem_db/bucket.rb', line 5 def initialize @values = [] end |
Instance Method Details
#add(_obj, value) ⇒ Object
9 10 11 |
# File 'lib/mem_db/bucket.rb', line 9 def add(_obj, value) @values.push(value) end |
#query(_query, out:) ⇒ Object
13 14 15 |
# File 'lib/mem_db/bucket.rb', line 13 def query(_query, out:) out.add(@values) end |