Module: Fog::Account

Defined in:
lib/fog/account.rb,
lib/fog/storm_on_demand/account.rb,
lib/fog/storm_on_demand/models/account/token.rb,
lib/fog/storm_on_demand/models/account/tokens.rb,
lib/fog/storm_on_demand/requests/account/create_token.rb,
lib/fog/storm_on_demand/requests/account/expire_token.rb

Defined Under Namespace

Classes: StormOnDemand

Class Method Summary collapse

Class Method Details

.[](provider) ⇒ Object



4
5
6
# File 'lib/fog/account.rb', line 4

def self.[](provider)
  self.new(:provider => provider)
end

.new(attributes) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fog/account.rb', line 8

def self.new(attributes)
  attributes = attributes.dup
  provider = attributes.delete(:provider).to_s.downcase.to_sym

  if provider == :stormondemand
    require 'fog/storm_on_demand/account'
    Fog::Account::StormOnDemand.new(attributes)
  else
    raise ArgumentError.new("#{provider} has no account service")
  end
end

.providersObject



20
21
22
# File 'lib/fog/account.rb', line 20

def self.providers
  Fog.services[:account]
end