class Dnsruby::RR::IN::A

Class for DNS Address (A) resource records.

RFC 1035 Section 3.4.1

Attributes

address[RW]

The RR's (Resolv::IPv4) address field

Public Instance Methods

from_hash(hash) click to toggle source

Create the RR from a hash

# File lib/dnsruby/resource/A.rb, line 33
def from_hash(hash)
  @address = IPv4.create(hash[:address])
end
from_string(input) click to toggle source

Create the RR from a standard string

# File lib/dnsruby/resource/A.rb, line 38
def from_string(input)
  @address = IPv4.create(input)
end
rdata_to_string() click to toggle source
# File lib/dnsruby/resource/A.rb, line 42
def rdata_to_string
  return @address.to_s
end