Class: Simplenet::Client::Zone

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

Instance Method Summary collapse

Methods inherited from Base

#delete, #list, #method_missing, #show

Constructor Details

#initialize(url) ⇒ Zone

Returns a new instance of Zone.



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

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

Dynamic Method Handling

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

Instance Method Details

#create(datacenter_id, name) ⇒ Object



10
11
12
13
14
15
# File 'lib/simplenet/client/zone.rb', line 10

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