Class: Dionysus::Producer::Registry
- Inherits:
-
Object
- Object
- Dionysus::Producer::Registry
- Defined in:
- lib/dionysus/producer/registry.rb
Defined Under Namespace
Classes: Registration, Validator
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/producer/registry.rb', line 7 def initialize @container = {} end |
Instance Method Details
#namespace(namespace, &block) ⇒ Object
11 12 13 14 15 |
# File 'lib/dionysus/producer/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/producer/registry.rb', line 17 def registrations container end |