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



5
6
7
# File 'lib/fluent/plugin/out_http_ext.rb', line 5

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

#each_deep_detail(directory, &proc) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/fluent/plugin/out_http_ext.rb', line 9

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