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

Version Path
fog-maestrodev-1.18.0.20131219022322 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/metering.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/metering.rb
fog-1.18.0 lib/fog/metering.rb