Module: ActiveSupport::Dependencies::Blamable
- Defined in:
- activesupport/lib/active_support/dependencies.rb
Overview
Exception file-blaming
Instance Method Summary (collapse)
- - (Object) blame_file!(file)
- - (Object) blamed_files
- - (Object) copy_blame!(exc)
- - (Object) describe_blame
Instance Method Details
- (Object) blame_file!(file)
262 263 264 |
# File 'activesupport/lib/active_support/dependencies.rb', line 262 def blame_file!(file) (@blamed_files ||= []).unshift file end |
- (Object) blamed_files
266 267 268 |
# File 'activesupport/lib/active_support/dependencies.rb', line 266 def blamed_files @blamed_files ||= [] end |
- (Object) copy_blame!(exc)
275 276 277 278 |
# File 'activesupport/lib/active_support/dependencies.rb', line 275 def copy_blame!(exc) @blamed_files = exc.blamed_files.clone self end |
- (Object) describe_blame
270 271 272 273 |
# File 'activesupport/lib/active_support/dependencies.rb', line 270 def describe_blame return nil if blamed_files.empty? "This error occurred while loading the following files:\n #{blamed_files.join "\n "}" end |