Sha256: 1057254902750cf66d3ffbae85984f33a684c5952871e91da5a9ba9bb21efb36

Contents?: true

Size: 226 Bytes

Versions: 4

Compression:

Stored size: 226 Bytes

Contents

module SchemaExpectations
  module Util # :nodoc:
    def self.slice_hash(hash, *keys)
      keys.each_with_object(hash.class.new) do |key, memo|
        memo[key] = hash[key] if hash.has_key?(key)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
schema_expectations-0.5.0 lib/schema_expectations/util.rb
schema_expectations-0.4.0 lib/schema_expectations/util.rb
schema_expectations-0.3.0 lib/schema_expectations/util.rb
schema_expectations-0.2.0 lib/schema_expectations/util.rb