Module: Copland::Registry::Shutdown

Defined in:
lib/copland/registry.rb

Overview

When Registry#shutdown is called for the first time, it will extend this module. This will make several operations illegal, like querying a service.

Instance Method Summary collapse

Instance Method Details

#add_package(*args) ⇒ Object

Raises a DisallowedOperationException.



361
362
363
364
# File 'lib/copland/registry.rb', line 361

def add_package( *args )
  raise DisallowedOperationException,
    "cannot add package to registry after shutdown"
end

#configuration_point(*args) ⇒ Object

Raises a DisallowedOperationException.



355
356
357
358
# File 'lib/copland/registry.rb', line 355

def configuration_point( *args )
  raise DisallowedOperationException,
    "cannot get configuration point from registry after shutdown"
end

#package(*args) ⇒ Object

Raises a DisallowedOperationException.



343
344
345
346
# File 'lib/copland/registry.rb', line 343

def package( *args )
  raise DisallowedOperationException,
    "cannot get package from registry after shutdown"
end

#service(*args) ⇒ Object

Raises a DisallowedOperationException.



349
350
351
352
# File 'lib/copland/registry.rb', line 349

def service( *args )
  raise DisallowedOperationException,
    "cannot get service from registry after shutdown"
end

#shutdown(*args) ⇒ Object

Does nothing.



333
334
335
# File 'lib/copland/registry.rb', line 333

def shutdown( *args )
  # do nothing
end

#shutdown?Boolean

Returns true.

Returns:

  • (Boolean)


338
339
340
# File 'lib/copland/registry.rb', line 338

def shutdown?
  true
end