Module: Redis::Stream::Group

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

Constant Summary collapse

THUMBNAIL =
"THUMBNAIL".freeze
STREAM =
"STREAM".freeze
REPRESENTATION =
"REPRESENTATION".freeze
METADATA =
"METADATA".freeze
CACHE =
"CACHE".freeze
LIST =
"LIST".freeze
MANIFEST =
"MANIFEST".freeze

Class Method Summary collapse

Class Method Details

.exists?(group) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/redis/stream/group.rb', line 13

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

.lookup(group) ⇒ Object



21
22
23
24
25
# File 'lib/redis/stream/group.rb', line 21

def self.lookup(group)
  self.constants.each { |e| return e if e.to_s.downcase.eql?(group.downcase) }

  return '*'
end

.to_sObject



17
18
19
# File 'lib/redis/stream/group.rb', line 17

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