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