Sha256: 1ac0653fd80108f5278a6135797a87c8d2248b3fa229cabb3f524ed4eb4cac4e
Contents?: true
Size: 676 Bytes
Versions: 12
Compression:
Stored size: 676 Bytes
Contents
module Fog module Identity def self.[](provider) new(:provider => provider) end def self.new(attributes) attributes = attributes.dup # Prevent delete from having side effects provider = attributes.delete(:provider).to_s.downcase.to_sym unless providers.include?(provider) raise ArgumentError, "#{provider} has no identity service" end require "fog/#{provider}/identity" begin Fog::Identity.const_get(Fog.providers[provider]) rescue Fog.const_get(Fog.providers[provider])::Identity end.new(attributes) end def self.providers Fog.services[:identity] end end end
Version data entries
12 entries across 12 versions & 2 rubygems