Class: Fog::HP::DNS::Record
- Inherits:
-
Model
- Object
- Model
- Fog::HP::DNS::Record
- Defined in:
- lib/fog/hp/models/dns/record.rb
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(new_attributes = {}) ⇒ Record
constructor
A new instance of Record.
- #save ⇒ Object
Constructor Details
#initialize(new_attributes = {}) ⇒ Record
Returns a new instance of Record.
19 20 21 22 23 |
# File 'lib/fog/hp/models/dns/record.rb', line 19 def initialize(new_attributes = {}) super(new_attributes) self.domain_id = domain.id if domain self end |
Instance Method Details
#destroy ⇒ Object
25 26 27 28 29 |
# File 'lib/fog/hp/models/dns/record.rb', line 25 def destroy requires :id, :domain_id service.delete_record(self.domain_id, id) true end |
#save ⇒ Object
31 32 33 |
# File 'lib/fog/hp/models/dns/record.rb', line 31 def save identity ? update : create end |