Class: Dionysus::Consumer::Registry
- Inherits:
-
Object
- Object
- Dionysus::Consumer::Registry
- Defined in:
- lib/dionysus/consumer/registry.rb
Defined Under Namespace
Classes: Registration
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #namespace(namespace, &block) ⇒ Object
- #registrations ⇒ Object
Constructor Details
#initialize ⇒ Registry
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 |
#registrations ⇒ Object
17 18 19 |
# File 'lib/dionysus/consumer/registry.rb', line 17 def registrations container end |