Module: IDRegistry
- Defined in:
- lib/idregistry.rb,
lib/idregistry/utils.rb,
lib/idregistry/errors.rb,
lib/idregistry/railtie.rb,
lib/idregistry/version.rb,
lib/idregistry/registry.rb,
lib/idregistry/middleware.rb,
lib/idregistry/configuration.rb
Overview
IDRegistry is a generic object generator and identity map for Ruby.
Defined Under Namespace
Classes: Configuration, ConfigurationLockedError, IDRegistryError, IllegalConfigurationError, ObjectKeyError, PatternAdder, Railtie, Registry, RegistryMiddleware, Utils
Constant Summary collapse
- VERSION_STRING =
Current version of IDRegistry as a frozen string
::File.read(::File.dirname(__FILE__)+'/../../Version').strip.freeze
- VERSION =
Current version of IDRegistry as a Versionomy object, if the Versionomy gem is available. Otherwise, the same string value as VERSION_STRING.
defined?(::Versionomy) ? ::Versionomy.parse(VERSION_STRING) : VERSION_STRING
Class Method Summary collapse
-
.create(&block_) ⇒ Object
Create a new, empty registry with an empty configuration.
Class Method Details
.create(&block_) ⇒ Object
Create a new, empty registry with an empty configuration.
If you pass a block, it will be used to configure the registry, as if you had passed it to the config method.
570 571 572 573 574 |
# File 'lib/idregistry/registry.rb', line 570 def create(&block_) reg_ = Registry._new({}, {}, {}, {}) reg_.config(&block_) if block_ reg_ end |