Class: AngryWeb::HashSubsetMatcher
- Inherits:
-
ValueMatcher
- Object
- ValueMatcher
- AngryWeb::HashSubsetMatcher
- Defined in:
- lib/angry_web/matcher.rb
Instance Attribute Summary
Attributes inherited from ValueMatcher
Instance Method Summary collapse
Methods inherited from ValueMatcher
Constructor Details
This class inherits a constructor from AngryWeb::ValueMatcher
Instance Method Details
#match?(params) ⇒ Boolean
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/angry_web/matcher.rb', line 23 def match?(params) @value.keys.all? do |k| match = @value[k] param = params[k.to_s] case match when Regexp !! param[match] else match == param end end end |