Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/out_http_ext.rb

Instance Method Summary collapse

Instance Method Details

#each_deep(&proc) ⇒ Object



14
15
16
# File 'lib/fluent/plugin/out_http_ext.rb', line 14

def each_deep(&proc)
  self.each_deep_detail([], &proc)
end

#each_deep_detail(directory, &proc) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/fluent/plugin/out_http_ext.rb', line 18

def each_deep_detail(directory, &proc)
  self.each do |k, v|
    current = directory + [k]
    if v.kind_of?(Hash)
      v.each_deep_detail(current, &proc)
    else
      yield(current, v)
    end
  end
end