Class: Resolv::DNS::Resource::IN::A
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::IN::A
- Defined in:
- lib/net/dns/resolv.rb
Constant Summary
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#initialize(address) ⇒ A
constructor
A new instance of A.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(address) ⇒ A
Returns a new instance of A.
1718 1719 1720 |
# File 'lib/net/dns/resolv.rb', line 1718 def initialize(address) @address = IPv4.create(address) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
1721 1722 1723 |
# File 'lib/net/dns/resolv.rb', line 1721 def address @address end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
1727 1728 1729 |
# File 'lib/net/dns/resolv.rb', line 1727 def self.decode_rdata(msg) # :nodoc: return self.new(IPv4.new(msg.get_bytes(4))) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
:nodoc:
1723 1724 1725 |
# File 'lib/net/dns/resolv.rb', line 1723 def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) end |