Sha256: c7e7f2b3d4741a85cdda60dc54207b1e14cff90f3027cac9a937bf6578f7baf4

Contents?: true

Size: 207 Bytes

Versions: 41

Compression:

Stored size: 207 Bytes

Contents

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

Version data entries

41 entries across 38 versions & 3 rubygems

Version Path
fog-core-2.6.0 lib/fog/core/whitelist_keys.rb
fog-core-2.5.0 lib/fog/core/whitelist_keys.rb
fog-core-2.4.0 lib/fog/core/whitelist_keys.rb
fog-core-2.3.0 lib/fog/core/whitelist_keys.rb
fog-core-2.2.4 lib/fog/core/whitelist_keys.rb
fog-core-2.2.3 lib/fog/core/whitelist_keys.rb
fog-core-2.2.2 lib/fog/core/whitelist_keys.rb
fog-core-2.2.1 lib/fog/core/whitelist_keys.rb
fog-core-2.2.0 lib/fog/core/whitelist_keys.rb
fog-core-2.1.2 lib/fog/core/whitelist_keys.rb
fog-core-2.1.1 lib/fog/core/whitelist_keys.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-core-2.1.0/lib/fog/core/whitelist_keys.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-core-1.45.0/lib/fog/core/whitelist_keys.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-core-1.45.0/lib/fog/core/whitelist_keys.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-core-1.45.0/lib/fog/core/whitelist_keys.rb
fog-core-2.1.0 lib/fog/core/whitelist_keys.rb
fog-core-2.0.0 lib/fog/core/whitelist_keys.rb
fog-core-1.45.0 lib/fog/core/whitelist_keys.rb
fog-core-1.44.3 lib/fog/core/whitelist_keys.rb
fog-core-1.44.2 lib/fog/core/whitelist_keys.rb