Class: FactoryBot::Linter::FactoryTraitError

Inherits:
FactoryError show all
Defined in:
lib/factory_bot/linter.rb

Instance Method Summary collapse

Methods inherited from FactoryError

#message, #verbose_message

Constructor Details

#initialize(wrapped_error, factory, trait_name) ⇒ FactoryTraitError

Returns a new instance of FactoryTraitError.



52
53
54
55
# File 'lib/factory_bot/linter.rb', line 52

def initialize(wrapped_error, factory, trait_name)
  super(wrapped_error, factory)
  @trait_name = trait_name
end

Instance Method Details

#locationObject



57
58
59
# File 'lib/factory_bot/linter.rb', line 57

def location
  "#{@factory.name}+#{@trait_name}"
end