Class: Matchd::Response::NS
- Inherits:
-
Matchd::Response
- Object
- Matchd::Response
- Matchd::Response::NS
- Defined in:
- lib/matchd/response/ns.rb
Constant Summary
Constants inherited from Matchd::Response
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Attributes inherited from Matchd::Response
Instance Method Summary collapse
-
#initialize(opts) ⇒ NS
constructor
A new instance of NS.
- #resource ⇒ Object
Methods inherited from Matchd::Response
Constructor Details
#initialize(opts) ⇒ NS
2 3 4 5 |
# File 'lib/matchd/response/ns.rb', line 2 def initialize(opts) super @host = opts.is_a?(Hash) ? opts.fetch("host") : opts end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
7 8 9 |
# File 'lib/matchd/response/ns.rb', line 7 def host @host end |
Instance Method Details
#resource ⇒ Object
9 10 11 |
# File 'lib/matchd/response/ns.rb', line 9 def resource Resolv::DNS::Resource::IN::NS.new(Resolv::DNS::Name.create(host)) end |