Class: Waw::StaticController::AndMatcher

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

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, left, right) ⇒ AndMatcher

Returns a new instance of AndMatcher.



77
78
79
80
# File 'lib/waw/controllers/static/matcher.rb', line 77

def initialize(wawaccess, left, right)
  super(wawaccess)
  @left, @right = left, right
end

Instance Method Details

#matches?(env) ⇒ Boolean

Does the matcher matches a given path?

Returns:



83
84
85
# File 'lib/waw/controllers/static/matcher.rb', line 83

def matches?(env)
  @left.matches?(env) && @right.matches?(env)
end