Sha256: 73a1d2a2fa91e602d1ee946744ceba44807f3b67053a86791ad3a4489c503e94

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

class O
  #
  # make some hash methods works for <#O>
  #
  module HashMethodFix
    
    # merge new data IN PLACE
    #
    # @params [Hash,O] obj
    # @return [self]
    def _merge! obj
      _child.merge! O.get(obj)
      self
    end

    # merge new data
    #
    # @params [Hash,O] obj
    # @return [O] new <#O>
    def _merge obj
      data = _child.merge(O.get(obj))
      O[data]
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
o-2.0.4 lib/o/hash_method_fix.rb
o-2.0.3 lib/o/hash_method_fix.rb