Class: ConvenientService::Support::DependencyContainer::Commands::AssertValidContainer
- Inherits:
-
Command
- Object
- Command
- ConvenientService::Support::DependencyContainer::Commands::AssertValidContainer
- Defined in:
- lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
Instance Method Summary collapse
- #call ⇒ void
- #initialize(container:) ⇒ void constructor
Methods inherited from Command
Constructor Details
#initialize(container:) ⇒ void
18 19 20 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 18 def initialize(container:) @container = container end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
12 13 14 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 12 def container @container end |
Instance Method Details
#call ⇒ void
This method returns an undefined value.
26 27 28 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 26 def call ::ConvenientService.raise Exceptions::NotExportableModule.new(mod: container) unless Utils::Module.include_module?(container, DependencyContainer::Export) end |