Top Level Namespace
Constant Summary collapse
- BATCH_SIZE =
15
Instance Method Summary collapse
Instance Method Details
#flatten_hash(hash) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fluent/plugin/out_indicative.rb', line 11 def flatten_hash(hash) hash.each_with_object({}) do |(k, v), h| if v.is_a? Hash flatten_hash(v).map do |h_k, h_v| h["#{k}.#{h_k}"] = h_v end elsif !v.is_a? Array h[k] = v end end end |