We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82bdec3 commit 07a1411Copy full SHA for 07a1411
lib/floe/workflow/choice_rule/matches.rb
@@ -4,16 +4,10 @@ module Floe
4
class Workflow
5
class ChoiceRule
6
class Matches < Floe::Workflow::ChoiceRule
7
- def initialize(payload, *, **)
8
- super
9
- # NOTE: only StringMatches exists (so no Path option)
10
- # Since this is static, we're converting it up front
11
- @ref = Regexp.escape(@ref).gsub('\*', '.*?')
12
- end
13
-
14
def true?(context, input)
15
lhs = variable_value(context, input)
16
- valid?(lhs) && lhs.match?(ref)
+ rhs = compare_value(context, input)
+ valid?(lhs) && lhs.match?(Regexp.escape(rhs).gsub('\*', '.*?'))
17
end
18
19
0 commit comments