Class: Dyn::Traffic::Zone
- Inherits:
-
Base
- Object
- Base
- Dyn::Traffic::Zone
show all
- Defined in:
- lib/dyn/traffic/zone.rb
Instance Attribute Summary
Attributes inherited from Base
#zone
Instance Method Summary
collapse
Methods inherited from Base
#discard_change_set, #freeze, #get_change_set, #publish, #thaw
Constructor Details
#initialize(dyn, zone) ⇒ Zone
Returns a new instance of Zone.
24
25
26
27
|
# File 'lib/dyn/traffic/zone.rb', line 24
def initialize(dyn, zone)
@dyn = dyn
@zone = zone
end
|
Instance Method Details
#create(options) ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/dyn/traffic/zone.rb', line 29
def create(options)
@dyn.post("Zone/#{@zone}", {
:zone => @zone,
:rname => options[:rname],
:serial_style => options[:serial_style],
:ttl => options[:ttl]
})
end
|
#delete ⇒ Object
38
39
40
|
# File 'lib/dyn/traffic/zone.rb', line 38
def delete
@dyn.delete("Zone/#{@zone}")
end
|
#get ⇒ Object
42
43
44
|
# File 'lib/dyn/traffic/zone.rb', line 42
def get
@dyn.get("Zone/#{@zone}")
end
|
#get_all ⇒ Object
46
47
48
|
# File 'lib/dyn/traffic/zone.rb', line 46
def get_all
@dyn.get("Zone/")
end
|