Sha256: d199726d6d04eb9658438d2685be22a47b6617c5087a41bc4f5b6fd7c59792b6

Contents?: true

Size: 290 Bytes

Versions: 9

Compression:

Stored size: 290 Bytes

Contents

module Afipws
  module CoreExt
    module Hash
      def select_keys *keys
        select { |k, _| keys.include? k }
      end

      def has_entries? entries
        entries.each_pair.all? { |k, v| self[k] == v }
      end
    end
  end
end

class Hash
  include Afipws::CoreExt::Hash
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
afipws-1.3.2 lib/afipws/core_ext/hash.rb
afipws-1.3.1 lib/afipws/core_ext/hash.rb
afipws-1.3.0 lib/afipws/core_ext/hash.rb
afipws-1.2.3 lib/afipws/core_ext/hash.rb
afipws-1.2.2 lib/afipws/core_ext/hash.rb
afipws-1.2.1 lib/afipws/core_ext/hash.rb
afipws-1.2.0 lib/afipws/core_ext/hash.rb
afipws-1.1.0 lib/afipws/core_ext/hash.rb
afipws-1.0.4 lib/afipws/core_ext/hash.rb