Class: Redis::TimeSeries::Filters::NoValues
- Inherits:
-
Struct
- Object
- Struct
- Redis::TimeSeries::Filters::NoValues
- Defined in:
- lib/redis/time_series/filters.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
-
#values ⇒ Object
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label
87 88 89 |
# File 'lib/redis/time_series/filters.rb', line 87 def label @label end |
#values ⇒ Object
Returns the value of attribute values
87 88 89 |
# File 'lib/redis/time_series/filters.rb', line 87 def values @values end |
Class Method Details
.parse(str) ⇒ Object
90 91 92 93 94 |
# File 'lib/redis/time_series/filters.rb', line 90 def self.parse(str) label, values = str.split('!=') values = values.tr('()', '').split(',') new(label, values) end |
Instance Method Details
#to_h ⇒ Object
96 97 98 |
# File 'lib/redis/time_series/filters.rb', line 96 def to_h { label => { not: values } } end |
#to_s ⇒ Object
100 101 102 |
# File 'lib/redis/time_series/filters.rb', line 100 def to_s "#{label}!=(#{values.map(&:to_s).join(',')})" end |