Class: Waw::StaticController::OrMatcher

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

Overview

class AndMatcher

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) ⇒ OrMatcher

Returns a new instance of OrMatcher.



91
92
93
94
# File 'lib/waw/controllers/static/matcher.rb', line 91

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:



97
98
99
# File 'lib/waw/controllers/static/matcher.rb', line 97

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