Sha256: 1dbf8438671acb0d4d9335f7f496cc11054ca3aefdba50f0fb519773dbc1a440

Contents?: true

Size: 168 Bytes

Versions: 13

Compression:

Stored size: 168 Bytes

Contents

module DeepCover
  module Tools::Slice
    def slice(hash, *keys)
      keys.each_with_object(Hash.new) { |k, h| h[k] = hash[k] if hash.has_key?(k) }
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/tools/slice.rb
deep-cover-0.1.13 lib/deep_cover/tools/slice.rb
deep-cover-0.1.12 lib/deep_cover/tools/slice.rb
deep-cover-0.1.11 lib/deep_cover/tools/slice.rb
deep-cover-0.1.10 lib/deep_cover/tools/slice.rb
deep-cover-0.1.9 lib/deep_cover/tools/slice.rb
deep-cover-0.1.8 lib/deep_cover/tools/slice.rb
deep-cover-0.1.7 lib/deep_cover/tools/slice.rb
deep-cover-0.1.6 lib/deep_cover/tools/slice.rb
deep-cover-0.1.5 lib/deep_cover/tools/slice.rb
deep-cover-0.1.4 lib/deep_cover/tools/slice.rb
deep-cover-0.1.3 lib/deep_cover/tools/slice.rb
deep-cover-0.1.2 lib/deep_cover/tools/slice.rb