Class: EventStream::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/event_stream/registry.rb

Defined Under Namespace

Classes: UnregisteredStream

Class Method Summary collapse

Class Method Details

.lookup(stream_name) ⇒ Object



15
16
17
# File 'lib/event_stream/registry.rb', line 15

def self.lookup(stream_name)
  streams[stream_name] || (raise UnregisteredStream)
end

.register(stream_name, stream) ⇒ Object



11
12
13
# File 'lib/event_stream/registry.rb', line 11

def self.register(stream_name, stream)
  streams[stream_name] = stream
end