Module: Arel::ArrayPredications
- Defined in:
- lib/arel/array_predications.rb
Instance Method Summary collapse
-
#contained_by(value) ⇒ Object
Used by both JSON and ARRAY so it doesn’t try to cast to array.
-
#contains(value) ⇒ Object
Used by both JSON and ARRAY so it doesn’t try to cast to array.
- #excludes(value) ⇒ Object
- #overlaps(*values) ⇒ Object
Instance Method Details
#contained_by(value) ⇒ Object
Used by both JSON and ARRAY so it doesn’t try to cast to array
10 11 12 |
# File 'lib/arel/array_predications.rb', line 10 def contained_by(value) Arel::Nodes::ContainedBy.new(self, value) end |
#contains(value) ⇒ Object
Used by both JSON and ARRAY so it doesn’t try to cast to array
5 6 7 |
# File 'lib/arel/array_predications.rb', line 5 def contains(value) Arel::Nodes::Contains.new(self, value) end |
#excludes(value) ⇒ Object
14 15 16 |
# File 'lib/arel/array_predications.rb', line 14 def excludes(value) Arel::Nodes::Excludes.new(self, value) end |
#overlaps(*values) ⇒ Object
18 19 20 21 |
# File 'lib/arel/array_predications.rb', line 18 def overlaps(*values) values = values[0] if values.size == 1 && values[0].is_a?(Array) Arel::Nodes::Overlaps.new(self, values) end |