Class: WhatWeb::Matcher::Status

Inherits:
Base show all
Defined in:
lib/whatweb/matcher/status.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) ⇒ 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

#statusObject (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

Returns:

  • (Boolean)


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

def match?
  status == target.status
end