Class: OneSignal::Filter::FilterBuilder
- Inherits:
-
Object
- Object
- OneSignal::Filter::FilterBuilder
- Defined in:
- lib/onesignal/filter.rb
Instance Attribute Summary collapse
-
#b_field ⇒ Object
readonly
Returns the value of attribute b_field.
-
#b_hours_ago ⇒ Object
readonly
Returns the value of attribute b_hours_ago.
-
#b_key ⇒ Object
readonly
Returns the value of attribute b_key.
-
#b_location ⇒ Object
readonly
Returns the value of attribute b_location.
-
#b_relation ⇒ Object
readonly
Returns the value of attribute b_relation.
-
#b_value ⇒ Object
readonly
Returns the value of attribute b_value.
Instance Method Summary collapse
- #equals(value) ⇒ Object (also: #==)
- #exists ⇒ Object
- #greater_than(value) ⇒ Object (also: #>)
-
#initialize(field, params = {}) ⇒ FilterBuilder
constructor
A new instance of FilterBuilder.
- #lesser_than(value) ⇒ Object (also: #<)
- #not_equals(value) ⇒ Object (also: #!=)
- #not_exists ⇒ Object
Constructor Details
#initialize(field, params = {}) ⇒ FilterBuilder
Returns a new instance of FilterBuilder.
84 85 86 87 88 89 |
# File 'lib/onesignal/filter.rb', line 84 def initialize field, params = {} @b_field = field @b_key = params[:key] @b_location = params[:location] @b_value = params[:value] end |
Instance Attribute Details
#b_field ⇒ Object (readonly)
Returns the value of attribute b_field.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_field @b_field end |
#b_hours_ago ⇒ Object (readonly)
Returns the value of attribute b_hours_ago.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_hours_ago @b_hours_ago end |
#b_key ⇒ Object (readonly)
Returns the value of attribute b_key.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_key @b_key end |
#b_location ⇒ Object (readonly)
Returns the value of attribute b_location.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_location @b_location end |
#b_relation ⇒ Object (readonly)
Returns the value of attribute b_relation.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_relation @b_relation end |
#b_value ⇒ Object (readonly)
Returns the value of attribute b_value.
82 83 84 |
# File 'lib/onesignal/filter.rb', line 82 def b_value @b_value end |
Instance Method Details
#equals(value) ⇒ Object Also known as: ==
107 108 109 110 111 |
# File 'lib/onesignal/filter.rb', line 107 def equals value @b_relation = '=' @b_value = value.to_s build end |
#exists ⇒ Object
123 124 125 126 |
# File 'lib/onesignal/filter.rb', line 123 def exists @b_relation = 'exists' build end |
#greater_than(value) ⇒ Object Also known as: >
99 100 101 102 103 |
# File 'lib/onesignal/filter.rb', line 99 def greater_than value @b_relation = '>' @b_value = value.to_s build end |
#lesser_than(value) ⇒ Object Also known as: <
91 92 93 94 95 |
# File 'lib/onesignal/filter.rb', line 91 def lesser_than value @b_relation = '<' @b_value = value.to_s build end |
#not_equals(value) ⇒ Object Also known as: !=
115 116 117 118 119 |
# File 'lib/onesignal/filter.rb', line 115 def not_equals value @b_relation = '!=' @b_value = value.to_s build end |
#not_exists ⇒ Object
128 129 130 131 |
# File 'lib/onesignal/filter.rb', line 128 def not_exists @b_relation = 'not_exists' build end |