Class: Net::DNS::RR::SRV

Inherits:
Net::DNS::RR show all
Defined in:
lib/net/dns/rr/srv.rb

Overview


RR type SRV (RFC2052) A DNS RR for specifying the location of services (DNS SRV), contains the location of the server(s) for a specific protocol and domain (like a more general form of MX).


Constant Summary

Constants inherited from Net::DNS::RR

RRFIXEDSZ, RR_REGEXP

Constants included from Names

Names::INT16SZ

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Net::DNS::RR

#cls, #comp_data, #data, #initialize, #inspect, #name, parse, parse_packet, #rdata, #to_a, #to_s, #ttl, #type

Methods included from Names

#dn_comp, #dn_expand, #names_array, #pack_name, #valid?

Constructor Details

This class inherits a constructor from Net::DNS::RR

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



13
14
15
# File 'lib/net/dns/rr/srv.rb', line 13

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



13
14
15
# File 'lib/net/dns/rr/srv.rb', line 13

def port
  @port
end

#priorityObject (readonly)

Returns the value of attribute priority.



13
14
15
# File 'lib/net/dns/rr/srv.rb', line 13

def priority
  @priority
end

#weightObject (readonly)

Returns the value of attribute weight.



13
14
15
# File 'lib/net/dns/rr/srv.rb', line 13

def weight
  @weight
end

Instance Method Details

#valueObject

Gets the standardized value for this record, represented by the value of port, priority, weight, and host.

Returns a String.



20
21
22
# File 'lib/net/dns/rr/srv.rb', line 20

def value
  "#{port} #{priority} #{weight} #{host}"
end