Class: Dionysus::Consumer::Registry

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

Defined Under Namespace

Classes: Registration

Instance Method Summary collapse

Constructor Details

#initializeRegistry

Returns a new instance of Registry.



7
8
9
# File 'lib/dionysus/consumer/registry.rb', line 7

def initialize
  @container = {}
end

Instance Method Details

#namespace(namespace, &block) ⇒ Object



11
12
13
14
15
# File 'lib/dionysus/consumer/registry.rb', line 11

def namespace(namespace, &block)
  registration = Registration.new(namespace)
  registration.instance_eval(&block)
  container[namespace] = registration
end

#registrationsObject



17
18
19
# File 'lib/dionysus/consumer/registry.rb', line 17

def registrations
  container
end