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, ensure_ends_with_dot, ensure_ends_without_dot, escape, #hash, #key, #log!, long_quote, needs_long_quotes?, quote, #to_hash, #to_json, #to_s, #type, unescape, unlong_quote, unquote, #wildcard?

Constructor Details

#initialize(record) ⇒ NS

Returns a new instance of NS.



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

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



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

def rdata
  { nsdname: nsdname }
end

#rdata_txtObject



20
21
22
# File 'lib/record_store/record/ns.rb', line 20

def rdata_txt
  nsdname
end