aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation/reporting.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-12-23 00:15:10 +0100
committerXavier Noria <fxn@hashref.com>2010-12-23 00:15:10 +0100
commit8a3132b8a936bc4d32858d10fd985c3de5e57fd8 (patch)
treee0ae41f2a2fa66754300afa81bbb0aab55b8f702 /activesupport/lib/active_support/deprecation/reporting.rb
parent55f2e9f898cb6d1c518eaef23592638813c23450 (diff)
parent15ce225ab035bf92e2cb9994db80e60e1cd609bd (diff)
downloadrails-8a3132b8a936bc4d32858d10fd985c3de5e57fd8.tar.gz
rails-8a3132b8a936bc4d32858d10fd985c3de5e57fd8.tar.bz2
rails-8a3132b8a936bc4d32858d10fd985c3de5e57fd8.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'activesupport/lib/active_support/deprecation/reporting.rb')
-rw-r--r--activesupport/lib/active_support/deprecation/reporting.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb
index 6a7b11c7e0..c7723d139b 100644
--- a/activesupport/lib/active_support/deprecation/reporting.rb
+++ b/activesupport/lib/active_support/deprecation/reporting.rb
@@ -2,7 +2,13 @@ module ActiveSupport
module Deprecation
class << self
attr_accessor :silenced
-
+
+ # Outputs a deprecation warning to the output configured by <tt>ActiveSupport::Deprecation.behavior</tt>
+ #
+ # Example:
+ #
+ # ActiveSupport::Deprecation.warn("something broke!")
+ # #=> "DEPRECATION WARNING: something broke! (called from your_code.rb:1)"
def warn(message = nil, callstack = caller)
return if silenced
deprecation_message(callstack, message).tap do |m|