Sha256: 654dc137e1fd16876dd74a2b29e8fe1a067e4aef1967c18c77b32958f5e5b4aa

Contents?: true

Size: 216 Bytes

Versions: 1

Compression:

Stored size: 216 Bytes

Contents

require 'uri'

module Noder
  module Utils
    def slice_hash(hash, keys)
      keys.each_with_object({}) { |k, new_hash| new_hash[k] = hash[k] if hash.has_key?(k) }
    end
    module_function :slice_hash
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
noder-0.0.2 lib/noder/utils.rb