Class: MemDB::Bucket

Inherits:
Object
  • Object
show all
Defined in:
lib/mem_db/bucket.rb

Instance Method Summary collapse

Constructor Details

#initializeBucket

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