aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/predications.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/predications.rb')
-rw-r--r--lib/arel/predications.rb24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/arel/predications.rb b/lib/arel/predications.rb
index b05fc6f99a..1d2b0de235 100644
--- a/lib/arel/predications.rb
+++ b/lib/arel/predications.rb
@@ -118,20 +118,28 @@ Passing a range to `#not_in` is deprecated. Call `#not_between`, instead.
grouping_all :not_in, others
end
- def matches other, escape = nil
- Nodes::Matches.new self, quoted_node(other), escape
+ def matches other, escape = nil, case_sensitive = false
+ Nodes::Matches.new self, quoted_node(other), escape, case_sensitive
end
- def matches_any others, escape = nil
- grouping_any :matches, others, escape
+ def matches_regexp other, case_sensitive = true
+ Nodes::Regexp.new self, quoted_node(other), case_sensitive
end
- def matches_all others, escape = nil
- grouping_all :matches, others, escape
+ def matches_any others, escape = nil, case_sensitive = false
+ grouping_any :matches, others, escape, case_sensitive
end
- def does_not_match other, escape = nil
- Nodes::DoesNotMatch.new self, quoted_node(other), escape
+ def matches_all others, escape = nil, case_sensitive = false
+ grouping_all :matches, others, escape, case_sensitive
+ end
+
+ def does_not_match other, escape = nil, case_sensitive = false
+ Nodes::DoesNotMatch.new self, quoted_node(other), escape, case_sensitive
+ end
+
+ def does_not_match_regexp other, case_sensitive = true
+ Nodes::NotRegexp.new self, quoted_node(other), case_sensitive
end
def does_not_match_any others, escape = nil