File Manager

Path: /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/tins-1.25.0/lib/tins/

Viewing File: hash_union.rb

module Tins
  module HashUnion
    def |(other)
      case
      when other.respond_to?(:to_hash)
        other = other.to_hash
      when other.respond_to?(:to_h)
        other = other.to_h
      end
      other.merge(self)
    end
  end
end

require 'tins/alias'