Exception: Flows::Plugin::DependencyInjector::UnexpectedDependencyError

Inherits:
Error
  • Object
show all
Defined in:
lib/flows/plugin/dependency_injector/errors.rb

Overview

Raised when you're providing undeclared dependency.

Since:

  • 0.4.0

Instance Method Summary collapse

Constructor Details

#initialize(klass, names) ⇒ UnexpectedDependencyError

Returns a new instance of UnexpectedDependencyError.

Since:

  • 0.4.0



21
22
23
24
# File 'lib/flows/plugin/dependency_injector/errors.rb', line 21

def initialize(klass, names)
  @klass = klass
  @names = names
end

Instance Method Details

#messageObject

Since:

  • 0.4.0



26
27
28
# File 'lib/flows/plugin/dependency_injector/errors.rb', line 26

def message
  "Unexpected dependency(ies) for #{@klass}: #{@names.map(&:to_s).join(', ')}"
end