Class: MemDB::Out

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/mem_db/out.rb

Instance Method Summary collapse

Constructor Details

#initializeOut

Returns a new instance of Out.



7
8
9
# File 'lib/mem_db/out.rb', line 7

def initialize
  @arr = []
end

Instance Method Details

#add(res) ⇒ Object



11
12
13
14
15
# File 'lib/mem_db/out.rb', line 11

def add(res)
  @arr.push(res)

  true
end

#each(&block) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/mem_db/out.rb', line 17

def each(&block)
  return to_enum unless block_given?

  @arr.each do |values|
    values.each(&block)
  end
end