Class: DNS::ResourceRecord::IN::TXT
- Defined in:
- lib/faildns/resourcerecord/IN/TXT.rb
Overview
–
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ TXT-DATA /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
TXT-DATA One or more <character-string>s.
TXT RRs are used to hold descriptive text. The semantics of the text depends on the domain where it is found. ++
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ TXT
constructor
A new instance of TXT.
Methods inherited from Data
Constructor Details
#initialize(data) ⇒ TXT
54 55 56 |
# File 'lib/faildns/resourcerecord/IN/TXT.rb', line 54 def initialize (data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
52 53 54 |
# File 'lib/faildns/resourcerecord/IN/TXT.rb', line 52 def data @data end |
Class Method Details
._parse(string, original) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/faildns/resourcerecord/IN/TXT.rb', line 42 def self._parse (string, original) data = [] while !string.empty? data.push(string[1, (tmp = string.unpack('C'))]); string[0, tmp + 1] = '' end TXT.new(data) end |