Exception: ConvenientService::Support::DependencyContainer::Exceptions::NotExportedMethod Private

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/support/dependency_container/exceptions.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 Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(method_name:, method_scope:, mod:) ⇒ 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.

This method returns an undefined value.

Parameters:

  • method_name (String)
  • method_scope (Symbol)
  • mod (Module)

Since:

  • 1.0.0



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/convenient_service/support/dependency_container/exceptions.rb', line 60

def initialize_with_kwargs(method_name:, method_scope:, mod:)
  message = <<~TEXT
    Module `#{mod}` does NOT export method `#{method_name}` with `#{method_scope}` scope.

    Did you forget to export it from `#{mod}`? For example:

    module #{mod}
      export #{method_name}, scope: :#{method_scope} do |*args, **kwargs, &block|
        # ...
      end
    end
  TEXT

  initialize(message)
end