Class: Kawaii::FullMatcher
- Inherits:
-
Object
- Object
- Kawaii::FullMatcher
- Defined in:
- lib/kawaii/matchers.rb
Overview
Ensures the entire path is consumed by the wrapped Matcher instance.
Instance Method Summary (collapse)
-
- (FullMatcher) initialize(matcher)
constructor
Creates a FullMatcher.
-
- (Match) match(path)
Tries to match the entire actual path.
Constructor Details
- (FullMatcher) initialize(matcher)
Creates a Kawaii::FullMatcher.
123 124 125 |
# File 'lib/kawaii/matchers.rb', line 123 def initialize(matcher) @matcher = matcher end |
Instance Method Details
- (Match) match(path)
Tries to match the entire actual path.
130 131 132 133 |
# File 'lib/kawaii/matchers.rb', line 130 def match(path) m = @matcher.match(path) m if m && m.remaining_path == '' end |