Class: Zonesync::Zonefile::SOA

Inherits:
Record
  • Object
show all
Defined in:
lib/zonesync/zonefile.rb

Instance Attribute Summary collapse

Attributes inherited from Record

#comment, #klass, #ttl

Instance Method Summary collapse

Methods inherited from Record

writer_for_ttl

Constructor Details

#initialize(vars, zonefile_soa = nil) ⇒ SOA

Returns a new instance of SOA.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/zonesync/zonefile.rb', line 114

def initialize(vars, zonefile_soa = nil)
  @vars = vars
  if zonefile_soa
    self.origin = qualify_host(zonefile_soa.origin.to_s)
    @vars[:last_host] = origin
    self.ttl = zonefile_soa.ttl.to_i
    self.klass = zonefile_soa.klass.to_s
    self.nameserver = qualify_host(zonefile_soa.ns.to_s)
    self.responsible_party = qualify_host(zonefile_soa.rp.to_s)
    self.serial = zonefile_soa.serial.to_i
    self.refresh_time = zonefile_soa.refresh.to_i
    self.retry_time = zonefile_soa.reretry.to_i
    self.expiry_time = zonefile_soa.expiry.to_i
    self.nxttl = zonefile_soa.nxttl.to_i
  end
end

Instance Attribute Details

#expiry_timeObject

Returns the value of attribute expiry_time.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def expiry_time
  @expiry_time
end

#nameserverObject

Returns the value of attribute nameserver.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def nameserver
  @nameserver
end

#nxttlObject

Returns the value of attribute nxttl.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def nxttl
  @nxttl
end

#originObject

Returns the value of attribute origin.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def origin
  @origin
end

#refresh_timeObject

Returns the value of attribute refresh_time.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def refresh_time
  @refresh_time
end

#responsible_partyObject

Returns the value of attribute responsible_party.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def responsible_party
  @responsible_party
end

#retry_timeObject

Returns the value of attribute retry_time.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def retry_time
  @retry_time
end

#serialObject

Returns the value of attribute serial.



112
113
114
# File 'lib/zonesync/zonefile.rb', line 112

def serial
  @serial
end