Class: ROM::AutoRegistrationStrategies::NoNamespace Private
- Defined in:
- lib/rom/setup/auto_registration_strategies/no_namespace.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
NoNamespace strategy assumes components are not defined within a namespace
Constant Summary
Constants inherited from Base
Base::EXTENSION_REGEX, Base::PathnameType
Instance Attribute Summary collapse
-
#directory ⇒ Pathname
readonly
The path to dir with components.
-
#entity ⇒ Symbol
readonly
Component identifier.
Attributes inherited from Base
Instance Method Summary collapse
-
#call ⇒ Object
private
Load components.
Methods included from Initializer
Instance Attribute Details
#directory ⇒ Pathname (readonly)
Returns The path to dir with components.
15 |
# File 'lib/rom/setup/auto_registration_strategies/no_namespace.rb', line 15 option :directory, type: PathnameType |
#entity ⇒ Symbol (readonly)
Returns Component identifier.
19 |
# File 'lib/rom/setup/auto_registration_strategies/no_namespace.rb', line 19 option :entity, type: Types::Strict::Symbol |
Instance Method Details
#call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Load components
24 25 26 27 28 |
# File 'lib/rom/setup/auto_registration_strategies/no_namespace.rb', line 24 def call Inflector.camelize( file.sub(/^#{directory}\/#{entity}\//, '').sub(EXTENSION_REGEX, '') ) end |