Class: Cranky::Linter::FactoryError

Inherits:
Object
  • Object
show all
Defined in:
lib/cranky/linter.rb

Direct Known Subclasses

FactoryTraitError

Instance Method Summary collapse

Constructor Details

#initialize(wrapped_error, factory_name) ⇒ FactoryError

Returns a new instance of FactoryError.



34
35
36
37
# File 'lib/cranky/linter.rb', line 34

def initialize(wrapped_error, factory_name)
  @wrapped_error = wrapped_error
  @factory_name  = factory_name
end

Instance Method Details

#locationObject



44
45
46
# File 'lib/cranky/linter.rb', line 44

def location
  @factory_name
end

#messageObject



39
40
41
42
# File 'lib/cranky/linter.rb', line 39

def message
  message = @wrapped_error.message
  "* #{location} - #{message} (#{@wrapped_error.class.name})"
end