Class: Simplenet::Client::Datacenter

Inherits:
Base
  • Object
show all
Defined in:
lib/simplenet/client/datacenter.rb

Instance Method Summary collapse

Methods inherited from Base

#delete, #list, #method_missing, #show

Constructor Details

#initialize(url) ⇒ Datacenter

Returns a new instance of Datacenter.



5
6
7
8
# File 'lib/simplenet/client/datacenter.rb', line 5

def initialize(url)
  @url     = url
  @fullurl = "#{url}/datacenters"
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Simplenet::Client::Base

Instance Method Details

#create(name) ⇒ Object



10
11
12
# File 'lib/simplenet/client/datacenter.rb', line 10

def create(name)
  simplenet_post(@fullurl, {:name => name})
end