Class: Hash

Inherits:
Object show all
Defined in:
lib/pg_qx/patch.rb

Instance Method Summary collapse

Instance Method Details

#pg_query_walk(stack, &block) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/pg_qx/patch.rb', line 18

def pg_query_walk(stack, &block)
  each_pair do |k, v|
    stack.push(k)
    if block.call(stack, v)
      v.pg_query_walk(stack, &block)
    end
    stack.pop
  end
end