Class: Hecks::Bluebook::Expression::Resolver::StartsWith
- Inherits:
-
Struct
- Object
- Struct
- Hecks::Bluebook::Expression::Resolver::StartsWith
- Defined in:
- lib/hecks/bluebook/expression/resolver.rb
Overview
receiver.start_with?("prefix") / receiver.end_with?("suffix")
-- vendored addition, not (yet) upstream hecks (migration
plan task 9), the sibling gap the Split/Last/BlockPredicate
pass above flagged and deliberately left unfixed --
Query::Query.Run/Dispatch::Dispatch.Route/CommandBus:: CommandBus.Route's shared Params value object validates its
JSON-object shape with value.start_with?("{") && value. end_with?("}") (dispatch/query/command_bus.bluebook, all three
storehouse-kernel files, byte-identical text) -- .start_with?(/
.end_with?( matched none of this grammar's known suffixes, so
both fell through to the Lookup catch-all and crashed with the
identical TypeError: no implicit conversion of Symbol into Integer shape .split/.all? used to, confirmed live via a
real dispatch (not validate), not inferred. Two separate node
types rather than one mode:-keyed struct (the BlockPredicate/
SignTest precedent) -- start_with?/end_with? aren't two
spellings of the same test the way all?/any?/none? are (one
Array-aggregation family) or positive?/negative?/zero? are
(one comparison-against-0 family) ; they check different ends of
the same string and share nothing but their
receiver-plus-literal-argument shape. substring is taken
literally between the quotes, same "no sub-grammar to recurse
into" precedent Split's separator/MatchesRegex's pattern
already set.
Instance Attribute Summary collapse
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#substring ⇒ Object
Returns the value of attribute substring.
Instance Attribute Details
#receiver ⇒ Object
Returns the value of attribute receiver
160 161 162 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 160 def receiver @receiver end |
#substring ⇒ Object
Returns the value of attribute substring
160 161 162 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 160 def substring @substring end |