Class: Dry::Component::Loader
- Inherits:
-
Object
- Object
- Dry::Component::Loader
- Defined in:
- lib/dry/component/loader.rb
Defined Under Namespace
Classes: Component
Constant Summary collapse
- PATH_SEPARATOR =
'/'.freeze
Instance Attribute Summary collapse
-
#default_namespace ⇒ Object
readonly
Returns the value of attribute default_namespace.
-
#namespace_separator ⇒ Object
readonly
Returns the value of attribute namespace_separator.
-
#path_separator ⇒ Object
readonly
Returns the value of attribute path_separator.
Instance Method Summary collapse
-
#initialize(config) ⇒ Loader
constructor
A new instance of Loader.
- #load(component_path) ⇒ Object
Constructor Details
#initialize(config) ⇒ Loader
Returns a new instance of Loader.
48 49 50 51 52 |
# File 'lib/dry/component/loader.rb', line 48 def initialize(config) @default_namespace = config.default_namespace @namespace_separator = config.namespace_separator @path_separator = PATH_SEPARATOR end |
Instance Attribute Details
#default_namespace ⇒ Object (readonly)
Returns the value of attribute default_namespace.
44 45 46 |
# File 'lib/dry/component/loader.rb', line 44 def default_namespace @default_namespace end |
#namespace_separator ⇒ Object (readonly)
Returns the value of attribute namespace_separator.
45 46 47 |
# File 'lib/dry/component/loader.rb', line 45 def namespace_separator @namespace_separator end |
#path_separator ⇒ Object (readonly)
Returns the value of attribute path_separator.
46 47 48 |
# File 'lib/dry/component/loader.rb', line 46 def path_separator @path_separator end |