Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use op_prefix for ops #298

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading