Class: Hecks::Bluebook::Expression::Resolver::MatchesRegex
- Inherits:
-
Struct
- Object
- Struct
- Hecks::Bluebook::Expression::Resolver::MatchesRegex
- Defined in:
- lib/hecks/bluebook/expression/resolver.rb
Overview
receiver.match?(/pattern/) -- vendored addition, not (yet)
upstream hecks (migration plan task 8): confirmed the
SINGLE most impactful corpus-wide dispatch-time gap of the
whole migration -- .match?(regex) appears in nearly every
value_object's format-validation rule across every corpus
this migration touched (email/phone/ISO-8601-timestamp/zip
patterns, dozens of files), and had NO parse support at all:
it fell all the way through to the Lookup catch-all below,
which tried to split the ENTIRE ".match?(/\A\d5\z/)" text
on "." as if it were a dotted attribute path, and crashed with
an opaque "no implicit conversion of Symbol into Integer"
somewhere downstream -- confirmed live via a real dispatch,
not validate (validate never evaluates a predicate body).
receiver still needs its own parse (it may itself be a
dotted lookup, e.g. some_field.match?(...)), the pattern
text is taken as-is between the slashes (a Ruby Regexp literal,
not the evaluator's own mini-grammar -- there is nothing to
recurse into).
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags
79 80 81 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 79 def flags @flags end |
#pattern ⇒ Object
Returns the value of attribute pattern
79 80 81 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 79 def pattern @pattern end |
#receiver ⇒ Object
Returns the value of attribute receiver
79 80 81 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 79 def receiver @receiver end |