Module: Prismic::Predicates
- Defined in:
- lib/prismic/predicates.rb
Class Method Summary (collapse)
- + (Object) any(fragment, values)
- + (Object) at(fragment, value)
- + (Object) date_after(fragment, after)
- + (Object) date_before(fragment, before)
- + (Object) date_between(fragment, before, after)
- + (Object) day_of_month(fragment, day)
- + (Object) day_of_month_after(fragment, day)
- + (Object) day_of_month_before(fragment, day)
- + (Object) day_of_week(fragment, day)
- + (Object) day_of_week_after(fragment, day)
- + (Object) day_of_week_before(fragment, day)
- + (Object) fulltext(fragment, values)
- + (Object) gt(fragment, value)
- + (Object) has(fragment)
- + (Object) hour(fragment, hour)
- + (Object) hour_after(fragment, hour)
- + (Object) hour_before(fragment, hour)
- + (Object) in(fragment, value)
- + (Object) in_range(fragment, before, after)
- + (Object) lt(fragment, value)
- + (Object) missing(fragment)
- + (Object) month(fragment, month)
- + (Object) month_after(fragment, month)
- + (Object) month_before(fragment, month)
- + (Object) near(fragment, latitude, longitude, radius)
- + (Object) similar(fragment, value)
- + (Object) year(fragment, year)
- + (Object) year_after(fragment, year)
- + (Object) year_before(fragment, year)
Class Method Details
+ (Object) any(fragment, values)
12 13 14 |
# File 'lib/prismic/predicates.rb', line 12 def self.any(fragment, values) ['any', fragment, values] end |
+ (Object) at(fragment, value)
4 5 6 |
# File 'lib/prismic/predicates.rb', line 4 def self.at(fragment, value) ['at', fragment, value] end |
+ (Object) date_after(fragment, after)
48 49 50 |
# File 'lib/prismic/predicates.rb', line 48 def self.date_after(fragment, after) ['date.after', fragment, (after)] end |
+ (Object) date_before(fragment, before)
44 45 46 |
# File 'lib/prismic/predicates.rb', line 44 def self.date_before(fragment, before) ['date.before', fragment, (before)] end |
+ (Object) date_between(fragment, before, after)
52 53 54 |
# File 'lib/prismic/predicates.rb', line 52 def self.date_between(fragment, before, after) ['date.between', fragment, (before), (after)] end |
+ (Object) day_of_month(fragment, day)
56 57 58 |
# File 'lib/prismic/predicates.rb', line 56 def self.day_of_month(fragment, day) ['date.day-of-month', fragment, day] end |
+ (Object) day_of_month_after(fragment, day)
60 61 62 |
# File 'lib/prismic/predicates.rb', line 60 def self.day_of_month_after(fragment, day) ['date.day-of-month-after', fragment, day] end |
+ (Object) day_of_month_before(fragment, day)
64 65 66 |
# File 'lib/prismic/predicates.rb', line 64 def self.day_of_month_before(fragment, day) ['date.day-of-month-before', fragment, day] end |
+ (Object) day_of_week(fragment, day)
68 69 70 |
# File 'lib/prismic/predicates.rb', line 68 def self.day_of_week(fragment, day) ['date.day-of-week', fragment, day] end |
+ (Object) day_of_week_after(fragment, day)
72 73 74 |
# File 'lib/prismic/predicates.rb', line 72 def self.day_of_week_after(fragment, day) ['date.day-of-week-after', fragment, day] end |
+ (Object) day_of_week_before(fragment, day)
76 77 78 |
# File 'lib/prismic/predicates.rb', line 76 def self.day_of_week_before(fragment, day) ['date.day-of-week-before', fragment, day] end |
+ (Object) fulltext(fragment, values)
16 17 18 |
# File 'lib/prismic/predicates.rb', line 16 def self.fulltext(fragment, values) ['fulltext', fragment, values] end |
+ (Object) gt(fragment, value)
32 33 34 |
# File 'lib/prismic/predicates.rb', line 32 def self.gt(fragment, value) ['number.gt', fragment, value] end |
+ (Object) has(fragment)
24 25 26 |
# File 'lib/prismic/predicates.rb', line 24 def self.has(fragment) ['has', fragment] end |
+ (Object) hour(fragment, hour)
104 105 106 |
# File 'lib/prismic/predicates.rb', line 104 def self.hour(fragment, hour) ['date.hour', fragment, hour] end |
+ (Object) hour_after(fragment, hour)
112 113 114 |
# File 'lib/prismic/predicates.rb', line 112 def self.hour_after(fragment, hour) ['date.hour-after', fragment, hour] end |
+ (Object) hour_before(fragment, hour)
108 109 110 |
# File 'lib/prismic/predicates.rb', line 108 def self.hour_before(fragment, hour) ['date.hour-before', fragment, hour] end |
+ (Object) in(fragment, value)
8 9 10 |
# File 'lib/prismic/predicates.rb', line 8 def self.in(fragment, value) ['in', fragment, value] end |
+ (Object) in_range(fragment, before, after)
40 41 42 |
# File 'lib/prismic/predicates.rb', line 40 def self.in_range(fragment, before, after) ['number.inRange', fragment, before, after] end |
+ (Object) lt(fragment, value)
36 37 38 |
# File 'lib/prismic/predicates.rb', line 36 def self.lt(fragment, value) ['number.lt', fragment, value] end |
+ (Object) missing(fragment)
28 29 30 |
# File 'lib/prismic/predicates.rb', line 28 def self.missing(fragment) ['missing', fragment] end |
+ (Object) month(fragment, month)
80 81 82 |
# File 'lib/prismic/predicates.rb', line 80 def self.month(fragment, month) ['date.month', fragment, month] end |
+ (Object) month_after(fragment, month)
88 89 90 |
# File 'lib/prismic/predicates.rb', line 88 def self.month_after(fragment, month) ['date.month-after', fragment, month] end |
+ (Object) month_before(fragment, month)
84 85 86 |
# File 'lib/prismic/predicates.rb', line 84 def self.month_before(fragment, month) ['date.month-before', fragment, month] end |
+ (Object) near(fragment, latitude, longitude, radius)
116 117 118 |
# File 'lib/prismic/predicates.rb', line 116 def self.near(fragment, latitude, longitude, radius) ['geopoint.near', fragment, latitude, longitude, radius] end |
+ (Object) similar(fragment, value)
20 21 22 |
# File 'lib/prismic/predicates.rb', line 20 def self.similar(fragment, value) ['similar', fragment, value] end |
+ (Object) year(fragment, year)
92 93 94 |
# File 'lib/prismic/predicates.rb', line 92 def self.year(fragment, year) ['date.year', fragment, year] end |
+ (Object) year_after(fragment, year)
100 101 102 |
# File 'lib/prismic/predicates.rb', line 100 def self.year_after(fragment, year) ['date.year-after', fragment, year] end |
+ (Object) year_before(fragment, year)
96 97 98 |
# File 'lib/prismic/predicates.rb', line 96 def self.year_before(fragment, year) ['date.year-before', fragment, year] end |