Sha256: c1f2ff94d9668a8d02913897c8937c8550136986abc058839ba95dbd4f07c934

Contents?: true

Size: 299 Bytes

Versions: 1

Compression:

Stored size: 299 Bytes

Contents

require "dig/block/version"
require "ostruct"

module Dig
  module Block
    def dig(*)
      ret = super
      return ret unless ret.nil?
      yield if block_given?
    end
  end
end

::Hash.prepend Dig::Block
::Array.prepend Dig::Block
::Struct.prepend Dig::Block
::OpenStruct.prepend Dig::Block

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dig-block-1.1.0 lib/dig/block.rb