123456789_123456789_123456789_123456789_123456789_

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

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

Overview

Unstructured text resource.

Constant Summary

::Gem::Resolv::DNS::Resource - Inherited

ClassHash, ClassInsensitiveTypes, ClassValue

Class Method Summary

Instance Attribute Summary

  • #strings readonly

    Returns an Array of Strings for this TXT record.

::Gem::Resolv::DNS::Resource - Inherited

#ttl

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

Instance Method Summary

::Gem::Resolv::DNS::Resource - Inherited

::Gem::Resolv::DNS::Query - Inherited

Constructor Details

.new(first_string, *rest_strings) ⇒ TXT

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2428

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/rubygems/vendor/resolv/lib/resolv.rb', line 2448

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/rubygems/vendor/resolv/lib/resolv.rb', line 2435

attr_reader :strings

Instance Method Details

#data

Returns the concatenated string from #strings.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2440

def data
  @strings.join("")
end

#encode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2444

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