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.
1556 1557 1558 |
# File 'lib/resolv.rb', line 1556 def initialize(first_string, *rest_strings) @strings = [first_string, *rest_strings] end |
Instance Attribute Details
#strings ⇒ Object (readonly)
Returns the value of attribute strings.
1559 1560 1561 |
# File 'lib/resolv.rb', line 1559 def strings @strings end |
Class Method Details
.decode_rdata(msg) ⇒ Object
1569 1570 1571 1572 |
# File 'lib/resolv.rb', line 1569 def self.decode_rdata(msg) strings = msg.get_string_list return self.new(*strings) end |
Instance Method Details
#data ⇒ Object
1561 1562 1563 |
# File 'lib/resolv.rb', line 1561 def data @strings[0] end |
#encode_rdata(msg) ⇒ Object
1565 1566 1567 |
# File 'lib/resolv.rb', line 1565 def encode_rdata(msg) msg.put_string_list(@strings) end |