Sha256: e959428c2c5476b3c1d5ae48b936d15ab4034f6df10a033ef3019fd5fc7bf785
Contents?: true
Size: 394 Bytes
Versions: 9
Compression:
Stored size: 394 Bytes
Contents
module Footing module NilClass # Similar to ActiveSupport's #try added to NilClass. # Calling [] on nil always returns nil. # It becomes especially helpful when navigating through deeply nested Hashes. # # @example # dict = {} # dict[:foo][:bar][:other] # => nil # # @param [Object] key The key to lookup. def [](key) nil end end end
Version data entries
9 entries across 9 versions & 1 rubygems