123456789_123456789_123456789_123456789_123456789_

Class: Resolv::DNS::Resource::TXT

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Resolv::DNS::Resource
Defined in: lib/resolv.rb

Overview

Unstructured text resource.

Constant Summary

::Resolv::DNS::Resource - Inherited

ClassHash, ClassInsensitiveTypes, ClassValue

Class Method Summary

Instance Attribute Summary

  • #strings readonly

    Returns an Array of Strings for this TXT record.

::Resolv::DNS::Resource - Inherited

#ttl

Remaining Time To Live for this ::Resolv::DNS::Resource.

Instance Method Summary

::Resolv::DNS::Resource - Inherited

::Resolv::DNS::Query - Inherited

Constructor Details

.new(first_string, *rest_strings) ⇒ TXT

[ GitHub ]

  
# File 'lib/resolv.rb', line 2027

def initialize(first_string, *rest_strings)
  @strings = [first_string, *rest_strings]
end

Class Method Details

.decode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2047

def self.decode_rdata(msg) # :nodoc:
  strings = msg.get_string_list
  return self.new(*strings)
end

Instance Attribute Details

#strings (readonly)

Returns an Array of Strings for this TXT record.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2034

attr_reader :strings

Instance Method Details

#data

Returns the concatenated string from #strings.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2039

def data
  @strings.join("")
end

#encode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2043

def encode_rdata(msg) # :nodoc:
  msg.put_string_list(@strings)
end