Class: RiakCS

Inherits:
Fog::Bin show all
Defined in:
lib/fog/bin/riakcs.rb

Class Method Summary collapse

Methods inherited from Fog::Bin

available?, collections

Class Method Details

.[](service) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/bin/riakcs.rb', line 15

def [](service)
  @@connections ||= Hash.new do |hash, key|
    hash[key] = class_for(key)
  end
  @@connections[service]
end

.class_for(key) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fog/bin/riakcs.rb', line 4

def class_for(key)
  case key
  when :provisioning
    Fog::RiakCS::Provisioning
  when :usage
    Fog::RiakCS::Usage
  else
    raise ArgumentError, "Unrecognized service: #{key}"
  end
end

.servicesObject



22
23
24
# File 'lib/fog/bin/riakcs.rb', line 22

def services
  Fog::RiakCS.services
end