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

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

Overview

Domain Name resource abstract class.

Direct Known Subclasses

CNAME, NS, PTR

Constant Summary

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

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

Constructor Details

#initialize(name) ⇒ DomainName

Creates a new DomainName from name.


1786
1787
1788
# File 'lib/resolv.rb', line 1786

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

The name of this DomainName.


1793
1794
1795
# File 'lib/resolv.rb', line 1793

def name
  @name
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:


1799
1800
1801
# File 'lib/resolv.rb', line 1799

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

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:


1795
1796
1797
# File 'lib/resolv.rb', line 1795

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