Class: Zonesync::Parser::CNAME

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

Instance Attribute Summary collapse

Attributes inherited from Record

#comment, #host, #klass, #ttl

Instance Method Summary collapse

Methods inherited from Record

#type

Constructor Details

#initialize(vars, zonefile_record) ⇒ CNAME

Returns a new instance of CNAME.



180
181
182
183
184
185
186
187
188
189
190
# File 'lib/zonesync/parser.rb', line 180

def initialize(vars, zonefile_record)
  @vars = vars
  if zonefile_record
    self.host = qualify_host(zonefile_record.host.to_s)
    @vars[:last_host] = host
    self.ttl = zonefile_record.ttl.to_i
    self.klass = zonefile_record.klass.to_s
    self.domainname = qualify_host(zonefile_record.target.to_s)
    self.comment = zonefile_record.comment&.to_s
  end
end

Instance Attribute Details

#domainnameObject Also known as: target, rdata, alias

Returns the value of attribute domainname.



178
179
180
# File 'lib/zonesync/parser.rb', line 178

def domainname
  @domainname
end