Class: Redis::TimeSeries::Filters::Present

Inherits:
Struct
  • Object
show all
Defined in:
lib/redis/time_series/filters.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



53
54
55
# File 'lib/redis/time_series/filters.rb', line 53

def label
  @label
end

Class Method Details

.parse(str) ⇒ Object



56
57
58
# File 'lib/redis/time_series/filters.rb', line 56

def self.parse(str)
  new(str.delete('!='))
end

Instance Method Details

#to_hObject



60
61
62
# File 'lib/redis/time_series/filters.rb', line 60

def to_h
  { label => true }
end

#to_sObject



64
65
66
# File 'lib/redis/time_series/filters.rb', line 64

def to_s
  "#{label}!="
end