Class: ConvenientService::Support::DependencyContainer::Commands::AssertValidContainer Private

Inherits:
Command
  • Object
show all
Defined in:
lib/convenient_service/support/dependency_container/commands/assert_valid_container.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.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Command

[], call

Constructor Details

#initialize(container:) ⇒ void

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.

Parameters:

  • container (Module)

Since:

  • 1.0.0



23
24
25
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 23

def initialize(container:)
  @container = container
end

Instance Attribute Details

#containerObject (readonly)

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.

Since:

  • 1.0.0



17
18
19
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 17

def container
  @container
end

Instance Method Details

#callvoid

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.

This method returns an undefined value.



31
32
33
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb', line 31

def call
  ::ConvenientService.raise Exceptions::NotExportableModule.new(mod: container) unless Utils::Module.include_module?(container, DependencyContainer::Export)
end