Module: Fog::WhitelistKeys

Defined in:
lib/fog/core/whitelist_keys.rb

Class Method Summary collapse

Class Method Details

.whitelist(hash, valid_keys) ⇒ Object



3
4
5
6
# File 'lib/fog/core/whitelist_keys.rb', line 3

def self.whitelist(hash, valid_keys)
  valid_hash = StringifyKeys.stringify(hash)
  Hash[valid_hash.select { |k, _v| valid_keys.include?(k) }]
end