Sha256: b5bec3394c47cc3318c241f0d8a9a315215bb22d2c103686ddd8e024ee80710d

Contents?: true

Size: 147 Bytes

Versions: 19

Compression:

Stored size: 147 Bytes

Contents

class Cistern::Hash
  def self.slice(hash, *keys)
    {}.tap do |sliced|
      keys.each{|k| sliced[k]= hash[k] if hash.key?(k)}
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cistern-0.7.1 lib/cistern/hash.rb
cistern-0.7.0 lib/cistern/hash.rb
cistern-0.6.0 lib/cistern/hash.rb
cistern-0.5.10 lib/cistern/hash.rb
cistern-0.5.9 lib/cistern/hash.rb
cistern-0.5.8 lib/cistern/hash.rb
cistern-0.5.7 lib/cistern/hash.rb
cistern-0.5.6 lib/cistern/hash.rb
cistern-0.5.4 lib/cistern/hash.rb
cistern-0.3.2 lib/cistern/hash.rb
cistern-0.3.1 lib/cistern/hash.rb
cistern-0.3.0 lib/cistern/hash.rb
cistern-0.2.3 lib/cistern/hash.rb
cistern-0.2.2 lib/cistern/hash.rb
cistern-0.2.1 lib/cistern/hash.rb
cistern-0.2.0 lib/cistern/hash.rb
cistern-0.1.4 lib/cistern/hash.rb
cistern-0.1.2 lib/cistern/hash.rb
cistern-0.0.3 lib/cistern/hash.rb