Module: ActiveSupport::Dependencies::Blamable
- Defined in:
- lib/active_support/dependencies.rb
Overview
Exception file-blaming.
Instance Method Summary collapse
-
#blame_file!(file) ⇒ Object
:nodoc:.
- #blamed_files ⇒ Object
- #copy_blame!(exc) ⇒ Object
- #describe_blame ⇒ Object
Instance Method Details
#blame_file!(file) ⇒ Object
:nodoc:
298 299 300 |
# File 'lib/active_support/dependencies.rb', line 298 def blame_file!(file) (@blamed_files ||= []).unshift file end |
#blamed_files ⇒ Object
302 303 304 |
# File 'lib/active_support/dependencies.rb', line 302 def blamed_files @blamed_files ||= [] end |
#copy_blame!(exc) ⇒ Object
311 312 313 314 |
# File 'lib/active_support/dependencies.rb', line 311 def copy_blame!(exc) @blamed_files = exc.blamed_files.clone self end |
#describe_blame ⇒ Object
306 307 308 309 |
# File 'lib/active_support/dependencies.rb', line 306 def describe_blame return nil if blamed_files.empty? "This error occurred while loading the following files:\n #{blamed_files.join "\n "}" end |