Class: Dynectastic::Record
- Defined in:
- lib/dynectastic/record.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#rdata ⇒ Object
Returns the value of attribute rdata.
-
#record_id ⇒ Object
Returns the value of attribute record_id.
-
#ttl ⇒ Object
Returns the value of attribute ttl.
-
#type ⇒ Object
Returns the value of attribute type.
-
#zone ⇒ Object
Returns the value of attribute zone.
Attributes inherited from Resource
#factory, #last_request, #session
Instance Method Summary collapse
Methods inherited from Resource
#attributes=, #delete, #get, #initialize, #post, #put
Constructor Details
This class inherits a constructor from Dynectastic::Resource
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def node @node end |
#rdata ⇒ Object
Returns the value of attribute rdata.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def rdata @rdata end |
#record_id ⇒ Object
Returns the value of attribute record_id.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def record_id @record_id end |
#ttl ⇒ Object
Returns the value of attribute ttl.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def ttl @ttl end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def type @type end |
#zone ⇒ Object
Returns the value of attribute zone.
5 6 7 |
# File 'lib/dynectastic/record.rb', line 5 def zone @zone end |
Instance Method Details
#save ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/dynectastic/record.rb', line 7 def save payload = { 'rdata' => rdata, 'ttl' => ttl } self.attributes = record_id ? update(payload) : create(payload) end |