Sha256: 24e1a643cfc8a37bb2ada9f2008f594c43f933049958f1468bc37bd50b8be26c

Contents?: true

Size: 331 Bytes

Versions: 7

Compression:

Stored size: 331 Bytes

Contents

require_relative 'core'

# Extend core Hash object by aliasing it's `dig` method as `call`,
# and including the `Invokable` module.
#
# @see https://ruby-doc.org/core-2.7.0/Hash.html#method-i-dig Hash#dig
class Hash
  if RUBY_VERSION.split('.').take(2).join('.').to_f < 2.7
    include Invokable::Core
    alias call dig
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
invokable-0.6.0 lib/invokable/hash.rb
invokable-0.5.2 lib/invokable/hash.rb
invokable-0.5.1 lib/invokable/hash.rb
invokable-0.5.0 lib/invokable/hash.rb
invokable-0.4.2 lib/invokable/hash.rb
invokable-0.4.1 lib/invokable/hash.rb
invokable-0.4.0 lib/invokable/hash.rb