Class: Dnsruby::RR::IN::APL

Inherits:
Dnsruby::RR show all
Defined in:
lib/dnsruby/resource/APL.rb

Overview

Class for DNS Address (A) resource records.

RFC 1035 Section 3.4.1

Constant Summary

Constants inherited from Dnsruby::RR

ClassInsensitiveTypes

Instance Attribute Summary collapse

Attributes inherited from Dnsruby::RR

#klass, #name, #rdata, #ttl, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Dnsruby::RR

#<=>, #==, #clone, create, #eql?, find_class, get_class, get_num, #hash, implemented_rrs, #init_defaults, new_from_data, new_from_hash, new_from_string, #rdlength, #sameRRset, #to_s

Instance Attribute Details

#prefixesObject

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



116
117
118
# File 'lib/dnsruby/resource/APL.rb', line 116

def prefixes
  @prefixes
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc: all



140
141
142
# File 'lib/dnsruby/resource/APL.rb', line 140

def self.decode_rdata(msg) #:nodoc: all
  new(Prefixes.create_from_message(msg))
end

Instance Method Details

#encode_rdata(msg, canonical = false) ⇒ Object

:nodoc: all



136
137
138
# File 'lib/dnsruby/resource/APL.rb', line 136

def encode_rdata(msg, canonical = false) #:nodoc: all
  @prefixes.encode_rdata(msg,canonical)
end

#from_data(data) ⇒ Object

:nodoc: all



118
119
120
# File 'lib/dnsruby/resource/APL.rb', line 118

def from_data(data) #:nodoc: all
  @prefixes = Prefixes.create(data)
end

#from_hash(hash) ⇒ Object

Create the RR from a hash



123
124
125
# File 'lib/dnsruby/resource/APL.rb', line 123

def from_hash(hash)
  @prefixes = Prefixes.create(hash[:prefixes])
end

#from_string(input) ⇒ Object

Create the RR from a standard string



128
129
130
# File 'lib/dnsruby/resource/APL.rb', line 128

def from_string(input)
  @prefixes = Prefixes.create(input)
end

#rdata_to_stringObject



132
133
134
# File 'lib/dnsruby/resource/APL.rb', line 132

def rdata_to_string
  @prefixes.to_s
end