Class: Glare::Domain::Zone
- Inherits:
-
Object
- Object
- Glare::Domain::Zone
- Defined in:
- lib/glare/domain/zone.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(client, fqdn) ⇒ Zone
constructor
A new instance of Zone.
- #records(type) ⇒ Object
Constructor Details
#initialize(client, fqdn) ⇒ Zone
Returns a new instance of Zone.
6 7 8 9 |
# File 'lib/glare/domain/zone.rb', line 6 def initialize(client, fqdn) @client = client @fqdn = fqdn end |
Instance Method Details
#id ⇒ Object
16 17 18 19 20 |
# File 'lib/glare/domain/zone.rb', line 16 def id return @id if @id zone_search = @client.get('/zones', name: registered_domain) @id = CfZones.from_result(zone_search).first_id end |
#records(type) ⇒ Object
11 12 13 14 |
# File 'lib/glare/domain/zone.rb', line 11 def records(type) api_result = record_search(type) CfDnsRecords.from_result(api_result) end |