Sha256: 35ed7fbce142be7278df4cba099c877d97a67440bea36f41a9ead3fcdf87f9ab

Contents?: true

Size: 599 Bytes

Versions: 5

Compression:

Stored size: 599 Bytes

Contents

module FunWith
  module Files
    module CoreExtensions
      module Hash
        def fwf_blank?
          self.length == 0
        end
  
        # Stolen from: activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 12
        def fwf_reverse_merge( other_hash )
          other_hash.merge( self )
        end
  
        # File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 17
        def fwf_reverse_merge!(other_hash)
          # right wins if there is no left
          merge!( other_hash ){|key,left,right| left }
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fun_with_files-0.0.18 ./lib/fun_with/files/core_extensions/hash.rb
fun_with_files-0.0.15 ./lib/fun_with/files/core_extensions/hash.rb
fun_with_files-0.0.14 ./lib/fun_with/files/core_extensions/hash.rb
fun_with_files-0.0.13 ./lib/fun_with/files/core_extensions/hash.rb
fun_with_files-0.0.12 ./lib/fun_with/files/core_extensions/hash.rb