Sha256: 6760c2b883be28bfbb7aedad8d66cb80d41a983b822fb8dc9c84752d4b1f5842
Contents?: true
Size: 586 Bytes
Versions: 10
Compression:
Stored size: 586 Bytes
Contents
module Fog module Metering 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 if providers.include?(provider) require "fog/#{provider}/metering" return Fog::Metering.const_get(Fog.providers[provider]).new(attributes) end raise ArgumentError, "#{provider} has no identity service" end def self.providers Fog.services[:metering] end end end
Version data entries
10 entries across 10 versions & 2 rubygems