Top Level Namespace
Defined Under Namespace
Modules: Fluent
Instance Method Summary collapse
-
#dig(hash, dotted_path) ⇒ Object
convert dot-string to value in hash ex: NetworkSettings.Ports -> hash[Ports].
Instance Method Details
#dig(hash, dotted_path) ⇒ Object
convert dot-string to value in hash ex: NetworkSettings.Ports -> hash[Ports]
3 4 5 6 7 8 9 10 11 |
# File 'lib/fluent/plugin/in_docker_inspect.rb', line 3 def dig(hash, dotted_path) parts = dotted_path.split '.', 2 match = hash[parts[0]] if !parts[1] or match.nil? return match else return dig(match, parts[1]) end end |