Class: Gluer::RegistrationDefinition

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ RegistrationDefinition

Returns a new instance of RegistrationDefinition.



3
4
5
# File 'lib/gluer/registration_definition.rb', line 3

def initialize(name)
  @name = name
end

Instance Attribute Details

#commit_hookObject (readonly)

Returns the value of attribute commit_hook.



19
20
21
# File 'lib/gluer/registration_definition.rb', line 19

def commit_hook
  @commit_hook
end

#registry_factoryObject (readonly)

Returns the value of attribute registry_factory.



19
20
21
# File 'lib/gluer/registration_definition.rb', line 19

def registry_factory
  @registry_factory
end

#rollback_hookObject (readonly)

Returns the value of attribute rollback_hook.



19
20
21
# File 'lib/gluer/registration_definition.rb', line 19

def rollback_hook
  @rollback_hook
end

Instance Method Details

#on_commit(&block) ⇒ Object



7
8
9
# File 'lib/gluer/registration_definition.rb', line 7

def on_commit(&block)
  @commit_hook = RegistrationHook.new(block)
end

#on_rollback(&block) ⇒ Object



11
12
13
# File 'lib/gluer/registration_definition.rb', line 11

def on_rollback(&block)
  @rollback_hook = RegistrationHook.new(block)
end

#registry(&block) ⇒ Object



15
16
17
# File 'lib/gluer/registration_definition.rb', line 15

def registry(&block)
  @registry_factory = block
end