Class: RecordStore::Record::TXT

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

Direct Known Subclasses

SPF

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) ⇒ TXT

Returns a new instance of TXT.



8
9
10
11
# File 'lib/record_store/record/txt.rb', line 8

def initialize(record)
  super
  @txtdata = record.fetch(:txtdata)
end

Instance Attribute Details

#txtdataObject

Returns the value of attribute txtdata.



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

def txtdata
  @txtdata
end

Instance Method Details

#rdataObject



13
14
15
# File 'lib/record_store/record/txt.rb', line 13

def rdata
  { txtdata: txtdata }
end

#rdata_txtObject



17
18
19
# File 'lib/record_store/record/txt.rb', line 17

def rdata_txt
  Record.quote(txtdata)
end