Class: Idcf::Dns::Resources::Zone

Inherits:
Base
  • Object
show all
Defined in:
lib/idcf/dns/resources/zone.rb

Overview

Zone resource class

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

class_name, generate_readers, inherited, #initialize, #inspect, validator_class

Constructor Details

This class inherits a constructor from Idcf::Dns::Resources::Base

Instance Method Details

#recordsArray<Record>

Returns an array of records.

Returns:

  • (Array<Record>)

    an array of records



7
8
9
10
11
# File 'lib/idcf/dns/resources/zone.rb', line 7

def records
  return @record_objects if @record_objects
  refresh
  @record_objects = @records.map { |record| Record.new(client, record) }
end

#refreshZone

Refresh this zone

Returns:

  • (Zone)

    self object



16
17
18
19
# File 'lib/idcf/dns/resources/zone.rb', line 16

def refresh
  self.attributes = client.get_zone(uuid).body
  self
end