Class: Dnsruby::RR::ISDN
- Inherits:
-
Dnsruby::RR
- Object
- Dnsruby::RR
- Dnsruby::RR::ISDN
- Defined in:
- lib/dnsruby/resource/ISDN.rb
Overview
Net::DNS::RR::ISDN - DNS ISDN resource record RFC 1183 Section 3.2
Constant Summary collapse
Constants inherited from Dnsruby::RR
Instance Attribute Summary collapse
-
#address ⇒ Object
The RR’s address field.
-
#subaddress ⇒ Object
The RR’s sub-address field.
Attributes inherited from Dnsruby::RR
#klass, #name, #rdata, #ttl, #type
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc: all.
Instance Method Summary collapse
-
#encode_rdata(msg, canonical = false) ⇒ Object
:nodoc: all.
-
#from_data(data) ⇒ Object
:nodoc: all.
-
#from_string(input) ⇒ Object
:nodoc: all.
-
#rdata_to_string ⇒ Object
:nodoc: all.
Methods inherited from Dnsruby::RR
#<=>, #==, #clone, create, #eql?, find_class, #from_hash, 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
#address ⇒ Object
The RR’s address field.
25 26 27 |
# File 'lib/dnsruby/resource/ISDN.rb', line 25 def address @address end |
#subaddress ⇒ Object
The RR’s sub-address field.
28 29 30 |
# File 'lib/dnsruby/resource/ISDN.rb', line 28 def subaddress @subaddress end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc: all
55 56 57 58 59 |
# File 'lib/dnsruby/resource/ISDN.rb', line 55 def self.decode_rdata(msg) #:nodoc: all address = msg.get_string subaddress = msg.get_string return self.new([address, subaddress]) end |
Instance Method Details
#encode_rdata(msg, canonical = false) ⇒ Object
:nodoc: all
50 51 52 53 |
# File 'lib/dnsruby/resource/ISDN.rb', line 50 def encode_rdata(msg, canonical=false) #:nodoc: all msg.put_string(@address) msg.put_string(@subaddress) end |
#from_data(data) ⇒ Object
:nodoc: all
30 31 32 |
# File 'lib/dnsruby/resource/ISDN.rb', line 30 def from_data(data) #:nodoc: all @address, @subaddress= data end |
#from_string(input) ⇒ Object
:nodoc: all
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/dnsruby/resource/ISDN.rb', line 34 def from_string(input) #:nodoc: all address, subaddress = input.split(" ") address.sub!(/^\"/, "") @address = address.sub(/\"$/, "") if (subaddress) subaddress.sub!(/^\"/, "") @subaddress = subaddress.sub(/\"$/, "") else @subaddress = nil end end |
#rdata_to_string ⇒ Object
:nodoc: all
46 47 48 |
# File 'lib/dnsruby/resource/ISDN.rb', line 46 def rdata_to_string #:nodoc: all return "#{@address} #{@subaddress}" end |