Class: Fog::DNS::Softlayer::Records
- Inherits:
-
Collection
- Object
- Collection
- Fog::DNS::Softlayer::Records
- Defined in:
- lib/fog/softlayer/models/dns/records.rb
Instance Method Summary collapse
Instance Method Details
permalink #all ⇒ Object
[View source]
18 19 20 21 22 23 |
# File 'lib/fog/softlayer/models/dns/records.rb', line 18 def all requires :domain clear data = service.get_records(domain.id).body load(data) end |
permalink #get(identifier) ⇒ Object
[View source]
25 26 27 28 29 30 31 32 |
# File 'lib/fog/softlayer/models/dns/records.rb', line 25 def get(identifier) return nil if identifier.nil? || identifier == "" response = service.get_record(identifier) data = response.body new.merge_attributes(data) rescue Excon::Errors::NotFound nil end |
permalink #new(attributes = {}) ⇒ Object
[View source]
34 35 36 |
# File 'lib/fog/softlayer/models/dns/records.rb', line 34 def new(attributes = {}) super({ :domain => domain }.merge!(attributes)) end |