Class: FactoryBot::Linter::FactoryError
- Inherits:
-
Object
- Object
- FactoryBot::Linter::FactoryError
- Defined in:
- lib/factory_bot/linter.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(wrapped_error, factory) ⇒ FactoryError
constructor
A new instance of FactoryError.
- #location ⇒ Object
- #message ⇒ Object
- #verbose_message ⇒ Object
Constructor Details
#initialize(wrapped_error, factory) ⇒ FactoryError
Returns a new instance of FactoryError.
29 30 31 32 |
# File 'lib/factory_bot/linter.rb', line 29 def initialize(wrapped_error, factory) @wrapped_error = wrapped_error @factory = factory end |
Instance Method Details
#location ⇒ Object
46 47 48 |
# File 'lib/factory_bot/linter.rb', line 46 def location @factory.name end |
#message ⇒ Object
34 35 36 37 |
# File 'lib/factory_bot/linter.rb', line 34 def = @wrapped_error. "* #{location} - #{} (#{@wrapped_error.class.name})" end |
#verbose_message ⇒ Object
39 40 41 42 43 44 |
# File 'lib/factory_bot/linter.rb', line 39 def <<~MESSAGE #{} #{@wrapped_error.backtrace.join("\n ")} MESSAGE end |