Class: Dynectastic::Zone
Instance Attribute Summary collapse
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#name ⇒ Object
Returns the value of attribute name.
-
#serial ⇒ Object
Returns the value of attribute serial.
-
#serial_style ⇒ Object
Returns the value of attribute serial_style.
-
#ttl ⇒ Object
Returns the value of attribute ttl.
-
#zone_type ⇒ Object
readonly
Returns the value of attribute zone_type.
Attributes inherited from Resource
#factory, #last_request, #session
Instance Method Summary collapse
- #destroy ⇒ Object
- #freeze ⇒ Object
- #frozen? ⇒ Boolean
- #publish ⇒ Object
- #published? ⇒ Boolean
- #save ⇒ Object
- #unfreeze ⇒ Object
Methods inherited from Resource
#attributes=, #delete, #get, #initialize, #post, #put
Constructor Details
This class inherits a constructor from Dynectastic::Resource
Instance Attribute Details
#contact ⇒ Object
Returns the value of attribute contact.
5 6 7 |
# File 'lib/dynectastic/zone.rb', line 5 def contact @contact end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/dynectastic/zone.rb', line 5 def name @name end |
#serial ⇒ Object
Returns the value of attribute serial.
5 6 7 |
# File 'lib/dynectastic/zone.rb', line 5 def serial @serial end |
#serial_style ⇒ Object
Returns the value of attribute serial_style.
5 6 7 |
# File 'lib/dynectastic/zone.rb', line 5 def serial_style @serial_style end |
#ttl ⇒ Object
Returns the value of attribute ttl.
5 6 7 |
# File 'lib/dynectastic/zone.rb', line 5 def ttl @ttl end |
#zone_type ⇒ Object (readonly)
Returns the value of attribute zone_type.
6 7 8 |
# File 'lib/dynectastic/zone.rb', line 6 def zone_type @zone_type end |
Instance Method Details
#destroy ⇒ Object
42 43 44 |
# File 'lib/dynectastic/zone.rb', line 42 def destroy factory.destroy(name) end |
#freeze ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/dynectastic/zone.rb', line 25 def freeze if factory.freeze(name) @frozen = true else job end end |
#frozen? ⇒ Boolean
50 51 52 |
# File 'lib/dynectastic/zone.rb', line 50 def frozen? @frozen end |
#publish ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/dynectastic/zone.rb', line 17 def publish if factory.publish(name) @published = true else job end end |
#published? ⇒ Boolean
46 47 48 |
# File 'lib/dynectastic/zone.rb', line 46 def published? @published end |
#save ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/dynectastic/zone.rb', line 8 def save payload = { 'rname' => contact, 'serial_style' => serial, 'ttl' => ttl } self.attributes = post("#{ factory.entity_base }/#{ name }", :body => payload) end |
#unfreeze ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/dynectastic/zone.rb', line 33 def unfreeze if factory.unfreeze(name) @frozen = false true else job end end |