Class: Redis::TimeSeries::Filters::AnyValue
- Inherits:
-
Struct
- Object
- Struct
- Redis::TimeSeries::Filters::AnyValue
- 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
69 70 71 |
# File 'lib/redis/time_series/filters.rb', line 69 def label @label end |
#values ⇒ Object
Returns the value of attribute values
69 70 71 |
# File 'lib/redis/time_series/filters.rb', line 69 def values @values end |
Class Method Details
.parse(str) ⇒ Object
72 73 74 75 76 |
# File 'lib/redis/time_series/filters.rb', line 72 def self.parse(str) label, values = str.split('=') values = values.tr('()', '').split(',') new(label, values) end |
Instance Method Details
#to_h ⇒ Object
78 79 80 |
# File 'lib/redis/time_series/filters.rb', line 78 def to_h { label => values } end |
#to_s ⇒ Object
82 83 84 |
# File 'lib/redis/time_series/filters.rb', line 82 def to_s "#{label}=(#{values.map(&:to_s).join(',')})" end |