Exception: SmartIoC::Errors::AmbiguousBeanDefinition
- Inherits:
-
StandardError
- Object
- StandardError
- SmartIoC::Errors::AmbiguousBeanDefinition
- Defined in:
- lib/smart_ioc/errors.rb
Instance Attribute Summary collapse
-
#parent_bean_definition ⇒ Object
Returns the value of attribute parent_bean_definition.
Instance Method Summary collapse
-
#initialize(bean_name, bean_definitions) ⇒ AmbiguousBeanDefinition
constructor
A new instance of AmbiguousBeanDefinition.
- #message ⇒ Object
Constructor Details
#initialize(bean_name, bean_definitions) ⇒ AmbiguousBeanDefinition
Returns a new instance of AmbiguousBeanDefinition.
11 12 13 14 |
# File 'lib/smart_ioc/errors.rb', line 11 def initialize(bean_name, bean_definitions) @bean_name = bean_name @bean_definitions = bean_definitions end |
Instance Attribute Details
#parent_bean_definition ⇒ Object
Returns the value of attribute parent_bean_definition.
9 10 11 |
# File 'lib/smart_ioc/errors.rb', line 9 def parent_bean_definition @parent_bean_definition end |
Instance Method Details
#message ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/smart_ioc/errors.rb', line 16 def <<~EOS Unable to inject bean :#{@bean_name}#{@parent_bean_definition ? " into :#{@parent_bean_definition.name} (package: #{@parent_bean_definition.package})" : ""}. Several bean definitions with name :#{@bean_name} were found: #{@bean_definitions.map(&:inspect).join("\n\n")} EOS end |