Exception: Flows::Plugin::DependencyInjector::UnexpectedDependencyTypeError

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

Overview

Raised when dependency has unexpected type.

Since:

  • 0.4.0

Instance Method Summary collapse

Constructor Details

#initialize(klass, name, value, type) ⇒ UnexpectedDependencyTypeError

Returns a new instance of UnexpectedDependencyTypeError.

Since:

  • 0.4.0



33
34
35
36
37
38
# File 'lib/flows/plugin/dependency_injector/errors.rb', line 33

def initialize(klass, name, value, type)
  @klass = klass
  @_name = name
  @value = value
  @_type = type
end

Instance Method Details

#messageObject

Since:

  • 0.4.0



40
41
42
# File 'lib/flows/plugin/dependency_injector/errors.rb', line 40

def message
  "#{@_name} dependency for #{@klass} has wrong type, must conform `#{@_type.inspect}`: `#{@value.inspect}`"
end