Skip to content

Commit

Permalink
Merge pull request #298 from kbrock/op_prefix
Browse files Browse the repository at this point in the history
Use op_prefix for ops
  • Loading branch information
Fryguy authored Dec 9, 2024
2 parents bd0d1cf + d17109b commit 50f4a92
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/floe/workflow/choice_rule/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ def is_timestamp?(value, predicate = true)
# rubocop:enable Naming/PredicateName
# rubocop:enable Style/OptionalBooleanParameter

def equals?(lhs, rhs)
def op_equals?(lhs, rhs)
lhs == rhs
end

def lessthan?(lhs, rhs)
def op_lessthan?(lhs, rhs)
lhs < rhs
end

def greaterthan?(lhs, rhs)
def op_greaterthan?(lhs, rhs)
lhs > rhs
end

def lessthanequals?(lhs, rhs)
def op_lessthanequals?(lhs, rhs)
lhs <= rhs
end

def greaterthanequals?(lhs, rhs)
def op_greaterthanequals?(lhs, rhs)
lhs >= rhs
end

def matches?(lhs, rhs)
def op_matches?(lhs, rhs)
lhs.match?(Regexp.escape(rhs).gsub('\*', '.*?'))
end

Expand All @@ -111,7 +111,7 @@ def parse_compare_key
if (match_values = OPERATION.match(key))
@compare_key = key
@type, operator, @path = match_values.captures
@operation = "#{operator.downcase}?".to_sym
@operation = "op_#{operator.downcase}?".to_sym
@compare_predicate = parse_predicate(type)
break
end
Expand Down

0 comments on commit 50f4a92

Please sign in to comment.