Class: Gem::Resolv::DNS::Resource::DomainName

Inherits:
Gem::Resolv::DNS::Resource show all
Defined in:
lib/rubygems/vendor/resolv/lib/resolv.rb

Overview

Domain Name resource abstract class.

Direct Known Subclasses

CNAME, NS, PTR

Constant Summary

Constants inherited from Gem::Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from Gem::Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::Resource

#==, #eql?, get_class, #hash

Constructor Details

#initialize(name) ⇒ DomainName

Creates a new DomainName from name.



2183
2184
2185
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2183

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

The name of this DomainName.



2190
2191
2192
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2190

def name
  @name
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2196
2197
2198
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2196

def self.decode_rdata(msg) # :nodoc:
  return self.new(msg.get_name)
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



2192
2193
2194
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2192

def encode_rdata(msg) # :nodoc:
  msg.put_name(@name)
end