Class: RecordStore::Record::NS

Inherits:
RecordStore::Record show all
Defined in:
lib/record_store/record/ns.rb

Constant Summary

Constants inherited from RecordStore::Record

CNAME_REGEX, FQDN_REGEX

Instance Attribute Summary collapse

Attributes inherited from RecordStore::Record

#fqdn, #id, #ttl

Instance Method Summary collapse

Methods inherited from RecordStore::Record

#==, build_from_yaml_definition, #hash, #key, #log!, #to_hash, #to_json, #to_s, #type

Constructor Details

#initialize(record) ⇒ NS

Returns a new instance of NS.



7
8
9
10
# File 'lib/record_store/record/ns.rb', line 7

def initialize(record)
  super
  @nsdname = Record.ensure_ends_with_dot(record.fetch(:nsdname))
end

Instance Attribute Details

#nsdnameObject

Returns the value of attribute nsdname.



3
4
5
# File 'lib/record_store/record/ns.rb', line 3

def nsdname
  @nsdname
end

Instance Method Details

#rdataObject



12
13
14
# File 'lib/record_store/record/ns.rb', line 12

def rdata
  { nsdname: nsdname }
end

#rdata_txtObject



16
17
18
# File 'lib/record_store/record/ns.rb', line 16

def rdata_txt
  nsdname
end