Class: DNSTraverse::Response::Maxdepth
- Inherits:
-
DNSTraverse::Response
- Object
- DNSTraverse::Response
- DNSTraverse::Response::Maxdepth
- Defined in:
- lib/dnstraverse/response_maxdepth.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#qclass ⇒ Object
readonly
Returns the value of attribute qclass.
-
#qname ⇒ Object
readonly
Returns the value of attribute qname.
-
#qtype ⇒ Object
readonly
Returns the value of attribute qtype.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from DNSTraverse::Response
#decoded_query, #infocache, #server, #starters, #starters_bailiwick, #stats_key
Instance Method Summary collapse
-
#initialize(args) ⇒ Maxdepth
constructor
A new instance of Maxdepth.
- #method_missing(key, *args, &block) ⇒ Object
- #to_s ⇒ Object
- #update_stats_key ⇒ Object
Methods inherited from DNSTraverse::Response
#cleanup, #evaluate, #inside_bailiwick?
Constructor Details
#initialize(args) ⇒ Maxdepth
Returns a new instance of Maxdepth.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 22 def initialize(args) # key items @qname = args[:qname] @qclass = args[:qclass] @qtype = args[:qtype] @ip = nil @status = :maxdepth update_stats_key return self end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key, *args, &block) ⇒ Object
33 34 35 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 33 def method_missing(key, *args, &block) super # there are no missing methods, we answer directly end |
Instance Attribute Details
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
20 21 22 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 20 def ip @ip end |
#qclass ⇒ Object (readonly)
Returns the value of attribute qclass.
20 21 22 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 20 def qclass @qclass end |
#qname ⇒ Object (readonly)
Returns the value of attribute qname.
20 21 22 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 20 def qname @qname end |
#qtype ⇒ Object (readonly)
Returns the value of attribute qtype.
20 21 22 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 20 def qtype @qtype end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
20 21 22 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 20 def status @status end |
Instance Method Details
#to_s ⇒ Object
41 42 43 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 41 def to_s return "Maximum depth exceeded" end |
#update_stats_key ⇒ Object
37 38 39 |
# File 'lib/dnstraverse/response_maxdepth.rb', line 37 def update_stats_key @stats_key = "key:#{@status}:#{@qname}:#{@qclass}:#{@qtype}" end |