Class: Gluer::RegistrationCollection
- Inherits:
-
Object
- Object
- Gluer::RegistrationCollection
- Defined in:
- lib/gluer/registration_collection.rb
Instance Method Summary collapse
- #add(registration) ⇒ Object
- #each ⇒ Object
-
#initialize(context, block) ⇒ RegistrationCollection
constructor
A new instance of RegistrationCollection.
Constructor Details
#initialize(context, block) ⇒ RegistrationCollection
Returns a new instance of RegistrationCollection.
5 6 7 8 |
# File 'lib/gluer/registration_collection.rb', line 5 def initialize(context, block) @context = context @block = block end |
Instance Method Details
#add(registration) ⇒ Object
16 17 18 |
# File 'lib/gluer/registration_collection.rb', line 16 def add(registration) registrations << registration end |
#each ⇒ Object
10 11 12 13 14 |
# File 'lib/gluer/registration_collection.rb', line 10 def each registrations.clear dsl.instance_eval(&block) registrations.each { |registration| yield(registration) } end |