Class: DNS::ResourceRecord::IN::TXT

Inherits:
Data
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Data

parse

Constructor Details

#initialize(data) ⇒ TXT

Returns a new instance of TXT.



54
55
56
# File 'lib/faildns/resourcerecord/IN/TXT.rb', line 54

def initialize (data)
  @data = data
end

Instance Attribute Details

#dataObject (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