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