class SmartIoC::Errors::AmbiguousBeanDefinition
Attributes
parent_bean_definition[RW]
Public Class Methods
new(bean_name, bean_definitions)
click to toggle source
# File lib/smart_ioc/errors.rb, line 11 def initialize(bean_name, bean_definitions) @bean_name = bean_name @bean_definitions = bean_definitions end
Public Instance Methods
message()
click to toggle source
# File lib/smart_ioc/errors.rb, line 16 def message <<~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