Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/delivery/query_parameters/filters.rb
Overview
Extend String class to allow semantic typing of filters
Instance Method Summary collapse
-
#all(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains all the specified values.
-
#any(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains any the specified values.
-
#contains(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains the specified value.
-
#eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has the specified value.
-
#gt(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is greater than the specified value.
-
#gt_or_eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is greater than or equal to the specified value.
-
#in(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that matches a value in the specified list.
-
#lt(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is less than the specified value.
-
#lt_or_eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is less than or equal to the specified value.
-
#range(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that falls within the specified range of values (both inclusive).
Instance Method Details
#all(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains all the specified values. This filter is applicable to array values only, such as sitemap location or value of Linked Items, Taxonomy and Multiple choice content elements.
20 21 22 |
# File 'lib/delivery/query_parameters/filters.rb', line 20 def all(*args) Delivery::QueryParameters::Filter.new(self, '[all]', *args) end |
#any(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains any the specified values. This filter is applicable to array values only, such as sitemap location or value of Linked Items, Taxonomy and Multiple choice content elements.
28 29 30 |
# File 'lib/delivery/query_parameters/filters.rb', line 28 def any(*args) Delivery::QueryParameters::Filter.new(self, '[any]', *args) end |
#contains(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that contains the specified value. This filter is applicable to array values only, such as sitemap location or value of Linked Items, Taxonomy and Multiple choice content elements.
36 37 38 |
# File 'lib/delivery/query_parameters/filters.rb', line 36 def contains(*args) Delivery::QueryParameters::Filter.new(self, '[contains]', *args) end |
#eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has the specified value.
42 43 44 |
# File 'lib/delivery/query_parameters/filters.rb', line 42 def eq(*args) Delivery::QueryParameters::Filter.new(self, '', *args) end |
#gt(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is greater than the specified value.
49 50 51 |
# File 'lib/delivery/query_parameters/filters.rb', line 49 def gt(*args) Delivery::QueryParameters::Filter.new(self, '[gt]', *args) end |
#gt_or_eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is greater than or equal to the specified value.
56 57 58 |
# File 'lib/delivery/query_parameters/filters.rb', line 56 def gt_or_eq(*args) Delivery::QueryParameters::Filter.new(self, '[gte]', *args) end |
#in(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that matches a value in the specified list.
63 64 65 |
# File 'lib/delivery/query_parameters/filters.rb', line 63 def in(*args) Delivery::QueryParameters::Filter.new(self, '[in]', *args) end |
#lt(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is less than the specified value.
70 71 72 |
# File 'lib/delivery/query_parameters/filters.rb', line 70 def lt(*args) Delivery::QueryParameters::Filter.new(self, '[lt]', *args) end |
#lt_or_eq(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that is less than or equal to the specified value.
77 78 79 |
# File 'lib/delivery/query_parameters/filters.rb', line 77 def lt_or_eq(*args) Delivery::QueryParameters::Filter.new(self, '[lte]', *args) end |
#range(*args) ⇒ Object
Represents a filter that matches a content item if the specified content element or system attribute has a value that falls within the specified range of values (both inclusive).
84 85 86 |
# File 'lib/delivery/query_parameters/filters.rb', line 84 def range(*args) Delivery::QueryParameters::Filter.new(self, '[range]', *args) end |