class Observed::Hash::Fetcher
Public Class Methods
new(hash)
click to toggle source
# File lib/observed/hash/fetcher.rb, line 8 def initialize(hash) @hash = hash || fail('The hash must not be nil') end
Public Instance Methods
[](key_path)
click to toggle source
# File lib/observed/hash/fetcher.rb, line 12 def [](key_path) at_key_path_on_hash @hash, key_path, create_if_missing: false do |h, k| h[k] end end