Class: Redis::TimeSeries::Filters::Equal

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



5
6
7
# File 'lib/redis/time_series/filters.rb', line 5

def label
  @label
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



5
6
7
# File 'lib/redis/time_series/filters.rb', line 5

def value
  @value
end

Class Method Details

.parse(str) ⇒ Object



8
9
10
# File 'lib/redis/time_series/filters.rb', line 8

def self.parse(str)
  new(*str.split('='))
end

Instance Method Details

#to_hObject



12
13
14
# File 'lib/redis/time_series/filters.rb', line 12

def to_h
  { label => value }
end

#to_sObject



16
17
18
# File 'lib/redis/time_series/filters.rb', line 16

def to_s
  "#{label}=#{value}"
end