Class: Waw::StaticController::Matcher
- Inherits:
-
AbstractMatcher
- Object
- AbstractMatcher
- Waw::StaticController::Matcher
- Defined in:
- lib/waw/controllers/static/matcher.rb
Instance Attribute Summary collapse
-
#predicate ⇒ Object
readonly
Matcher’s predicate.
Attributes inherited from AbstractMatcher
Instance Method Summary collapse
-
#initialize(wawaccess, predicate) ⇒ Matcher
constructor
Creates a matcher instance.
-
#matches?(env) ⇒ Boolean
Does the matcher matches a given path?.
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, predicate) ⇒ Matcher
Creates a matcher instance
49 50 51 52 |
# File 'lib/waw/controllers/static/matcher.rb', line 49 def initialize(wawaccess, predicate) super(wawaccess) @predicate = predicate end |
Instance Attribute Details
#predicate ⇒ Object (readonly)
Matcher’s predicate
46 47 48 |
# File 'lib/waw/controllers/static/matcher.rb', line 46 def predicate @predicate end |
Instance Method Details
#matches?(env) ⇒ Boolean
Does the matcher matches a given path?
55 56 57 |
# File 'lib/waw/controllers/static/matcher.rb', line 55 def matches?(env) instance_eval &predicate end |