Class: Matchd::Response::SRV
- Inherits:
-
Matchd::Response
- Object
- Matchd::Response
- Matchd::Response::SRV
- Defined in:
- lib/matchd/response/srv.rb
Constant Summary
Constants inherited from Matchd::Response
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Attributes inherited from Matchd::Response
Instance Method Summary collapse
-
#initialize(opts) ⇒ SRV
constructor
A new instance of SRV.
- #resource ⇒ Object
Methods inherited from Matchd::Response
Constructor Details
#initialize(opts) ⇒ SRV
Returns a new instance of SRV.
2 3 4 5 6 7 8 |
# File 'lib/matchd/response/srv.rb', line 2 def initialize(opts) super @target = opts.fetch("target") @priority = opts.fetch("priority") @weight = opts.fetch("weight") @port = opts.fetch("port") end |
Instance Attribute Details
#port ⇒ Object (readonly)
Returns the value of attribute port.
10 11 12 |
# File 'lib/matchd/response/srv.rb', line 10 def port @port end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
10 11 12 |
# File 'lib/matchd/response/srv.rb', line 10 def priority @priority end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
10 11 12 |
# File 'lib/matchd/response/srv.rb', line 10 def target @target end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
10 11 12 |
# File 'lib/matchd/response/srv.rb', line 10 def weight @weight end |
Instance Method Details
#resource ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/matchd/response/srv.rb', line 12 def resource Resolv::DNS::Resource::IN::SRV.new( priority, weight, port, target ) end |