Class: WhatWeb::Matcher::TagPattern

Inherits:
Base show all
Defined in:
lib/whatweb/matcher/tag_pattern.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#match, #target

Instance Method Summary collapse

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_patternObject (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/whatweb/matcher/tag_pattern.rb', line 12

def match?
  tag_pattern == target.tag_pattern
end