Class: Dyn::Traffic::Zone
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #create(options) ⇒ Object
- #delete ⇒ Object
- #get ⇒ Object
- #get_all ⇒ Object
-
#initialize(dyn, zone) ⇒ Zone
constructor
A new instance of Zone.
Methods inherited from Base
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() @dyn.post("Zone/#{@zone}", { :zone => @zone, :rname => [:rname], :serial_style => [:serial_style], :ttl => [: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 |