Module: SchemaExpectations::Util
- Defined in:
- lib/schema_expectations/util.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.slice_hash(hash, *keys) ⇒ Object
3 4 5 6 7 |
# File 'lib/schema_expectations/util.rb', line 3 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 |