Class: Waw::StaticController::NegateMatcher

Inherits:
AbstractMatcher show all
Defined in:
lib/waw/controllers/static/matcher.rb

Overview

class Matcher

Instance Attribute Summary

Attributes inherited from AbstractMatcher

#wawaccess

Instance Method Summary collapse

Methods inherited from AbstractMatcher

#&, #folder, #negate, #req_path, #|

Methods included from Waw::ScopeUtils

#config, #find_kernel_context, #logger, #params, #rack_env, #real_session, #request, #resources, #response, #root_folder, #session

Constructor Details

#initialize(wawaccess, operand) ⇒ NegateMatcher

Returns a new instance of NegateMatcher.



63
64
65
66
# File 'lib/waw/controllers/static/matcher.rb', line 63

def initialize(wawaccess, operand)
  super(wawaccess)
  @operand = operand
end

Instance Method Details

#matches?(env) ⇒ Boolean

Does the matcher matches a given path?

Returns:



69
70
71
# File 'lib/waw/controllers/static/matcher.rb', line 69

def matches?(env)
  !@operand.matches?(env)
end