Skip to content

Commit 50f4a92

Browse files
authored
Merge pull request #298 from kbrock/op_prefix
Use op_prefix for ops
2 parents bd0d1cf + d17109b commit 50f4a92

File tree

1 file changed

+7
-7
lines changed
  • lib/floe/workflow/choice_rule

1 file changed

+7
-7
lines changed

lib/floe/workflow/choice_rule/data.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,27 @@ def is_timestamp?(value, predicate = true)
8080
# rubocop:enable Naming/PredicateName
8181
# rubocop:enable Style/OptionalBooleanParameter
8282

83-
def equals?(lhs, rhs)
83+
def op_equals?(lhs, rhs)
8484
lhs == rhs
8585
end
8686

87-
def lessthan?(lhs, rhs)
87+
def op_lessthan?(lhs, rhs)
8888
lhs < rhs
8989
end
9090

91-
def greaterthan?(lhs, rhs)
91+
def op_greaterthan?(lhs, rhs)
9292
lhs > rhs
9393
end
9494

95-
def lessthanequals?(lhs, rhs)
95+
def op_lessthanequals?(lhs, rhs)
9696
lhs <= rhs
9797
end
9898

99-
def greaterthanequals?(lhs, rhs)
99+
def op_greaterthanequals?(lhs, rhs)
100100
lhs >= rhs
101101
end
102102

103-
def matches?(lhs, rhs)
103+
def op_matches?(lhs, rhs)
104104
lhs.match?(Regexp.escape(rhs).gsub('\*', '.*?'))
105105
end
106106

@@ -111,7 +111,7 @@ def parse_compare_key
111111
if (match_values = OPERATION.match(key))
112112
@compare_key = key
113113
@type, operator, @path = match_values.captures
114-
@operation = "#{operator.downcase}?".to_sym
114+
@operation = "op_#{operator.downcase}?".to_sym
115115
@compare_predicate = parse_predicate(type)
116116
break
117117
end

0 commit comments

Comments
 (0)