Sha256: 3894f8ad2b64273cdda5d3caf93a6053d7156cc6a20b939a5f67e242ac473aa5

Contents?: true

Size: 440 Bytes

Versions: 24

Compression:

Stored size: 440 Bytes

Contents

module Lev
  module Utilities

    def self.deep_merge(hash, override_hash)
      result = hash.dup
      override_hash.each_pair do |k,v|
        tv = result[k]
        result[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? deep_merge(tv, v) : v
      end
      result
    end

  end
end

module Kernel
  def eigenclass
    class << self
      self
    end
  end

  def includes_module?(mod)
    eigenclass.included_modules.include?(mod)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
lev-12.1.0 lib/lev/utilities.rb
lev-12.0.0 lib/lev/utilities.rb
lev-11.0.0 lib/lev/utilities.rb
lev-10.1.0 lib/lev/utilities.rb
lev-10.0.0 lib/lev/utilities.rb
lev-9.0.4 lib/lev/utilities.rb
lev-9.0.3 lib/lev/utilities.rb
lev-9.0.2 lib/lev/utilities.rb
lev-9.0.1 lib/lev/utilities.rb
lev-9.0.0 lib/lev/utilities.rb
lev-8.1.0 lib/lev/utilities.rb
lev-8.0.0 lib/lev/utilities.rb
lev-7.1.0 lib/lev/utilities.rb
lev-7.0.3 lib/lev/utilities.rb
lev-7.0.2 lib/lev/utilities.rb
lev-7.0.1 lib/lev/utilities.rb
lev-7.0.0 lib/lev/utilities.rb
lev-6.0.0 lib/lev/utilities.rb
lev-5.0.0 lib/lev/utilities.rb
lev-4.3.2 lib/lev/utilities.rb