Class: Dnsruby::RR::X25

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

Overview

Class for DNS X25 resource records. RFC 1183 Section 3.1

Constant Summary collapse

ClassValue =

:nodoc: all

nil
TypeValue =

:nodoc: all

Types::X25

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

#==, create, #eql?, #from_hash, get_class, #hash, implemented_rrs, #init_defaults, new_from_data, new_from_hash, new_from_string, #rdlength, #sameRRset, #to_s

Instance Attribute Details

#addressObject

The PSDN address



25
26
27
# File 'lib/Dnsruby/resource/X25.rb', line 25

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc: all



47
48
49
50
# File 'lib/Dnsruby/resource/X25.rb', line 47

def self.decode_rdata(msg) #:nodoc: all
  address = msg.get_string
  return self.new(*address)
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc: all



43
44
45
# File 'lib/Dnsruby/resource/X25.rb', line 43

def encode_rdata(msg) #:nodoc: all
  msg.put_string(@address)
end

#from_data(data) ⇒ Object



27
28
29
# File 'lib/Dnsruby/resource/X25.rb', line 27

def from_data(data)
  @address = data
end

#from_string(input) ⇒ Object



31
32
33
# File 'lib/Dnsruby/resource/X25.rb', line 31

def from_string(input)
  @address = input
end

#rdata_to_stringObject



35
36
37
38
39
40
41
# File 'lib/Dnsruby/resource/X25.rb', line 35

def rdata_to_string
  if (@address!=nil)
    return @address
  else
    return ""
  end
end