Class: Gluer::RegistrationCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/gluer/registration_collection.rb

Instance Method Summary collapse

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

#eachObject



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