Module: Redis::Stream::State

Defined in:
lib/redis/stream/state.rb

Constant Summary collapse

ERROR =
-1
IDLE =
0
RUNNING =
1
STOPPED =
2

Class Method Summary collapse

Class Method Details

.exists?(state) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/redis/stream/state.rb', line 10

def self.exists?(state)
  self.constants.include?(state.upcase.to_sym)
end

.to_sObject



14
15
16
# File 'lib/redis/stream/state.rb', line 14

def self.to_s
  self.constants.map { |m| m.to_s.downcase }.join(', ')
end