Class: WhatWeb::Matcher::Status
- Defined in:
- lib/whatweb/matcher/status.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(target, match) ⇒ Status
constructor
A new instance of Status.
- #match? ⇒ Boolean
Methods inherited from Base
#compiled_regexp, match?, #search_context
Constructor Details
#initialize(target, match) ⇒ Status
Returns a new instance of Status.
7 8 9 10 |
# File 'lib/whatweb/matcher/status.rb', line 7 def initialize(target, match) super(target, match) @status = match[:status].to_i end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/whatweb/matcher/status.rb', line 6 def status @status end |
Instance Method Details
#match? ⇒ Boolean
12 13 14 |
# File 'lib/whatweb/matcher/status.rb', line 12 def match? status == target.status end |