Class: Resolv::DNS::Resource::TXT
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::TXT
- Defined in:
- lib/resolv.rb
Constant Summary collapse
- TypeValue =
16
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#strings ⇒ Object
readonly
Returns the value of attribute strings.
Class Method Summary collapse
Instance Method Summary collapse
- #data ⇒ Object
- #encode_rdata(msg) ⇒ Object
-
#initialize(first_string, *rest_strings) ⇒ TXT
constructor
A new instance of TXT.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(first_string, *rest_strings) ⇒ TXT
Returns a new instance of TXT.
1602 1603 1604 |
# File 'lib/resolv.rb', line 1602 def initialize(first_string, *rest_strings) @strings = [first_string, *rest_strings] end |
Instance Attribute Details
#strings ⇒ Object (readonly)
Returns the value of attribute strings
1605 1606 1607 |
# File 'lib/resolv.rb', line 1605 def strings @strings end |
Class Method Details
.decode_rdata(msg) ⇒ Object
1615 1616 1617 1618 |
# File 'lib/resolv.rb', line 1615 def self.decode_rdata(msg) strings = msg.get_string_list return self.new(*strings) end |
Instance Method Details
#data ⇒ Object
1607 1608 1609 |
# File 'lib/resolv.rb', line 1607 def data @strings[0] end |
#encode_rdata(msg) ⇒ Object
1611 1612 1613 |
# File 'lib/resolv.rb', line 1611 def encode_rdata(msg) msg.put_string_list(@strings) end |