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