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