Class: RRs::IN::A
Constant Summary collapse
- TypeValue =
1- ClassValue =
1
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
The IPv4 address for this A.
Attributes inherited from Resource
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#initialize(address) ⇒ A
constructor
Creates a new A for
address.
Methods inherited from Resource
Constructor Details
#initialize(address) ⇒ A
Creates a new A for address.
9 10 11 |
# File 'lib/rrs/in/a.rb', line 9 def initialize(address) @address = IPv4.create(address) end |
Instance Attribute Details
#address ⇒ Object (readonly)
The IPv4 address for this A.
16 17 18 |
# File 'lib/rrs/in/a.rb', line 16 def address @address end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/rrs/in/a.rb', line 22 def self.decode_rdata(msg) # :nodoc: return self.new(IPv4.new(msg.get_bytes(4))) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
:nodoc:
18 19 20 |
# File 'lib/rrs/in/a.rb', line 18 def encode_rdata(msg) # :nodoc: msg.put_bytes(@address.address) end |