aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/kernel
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-12 18:40:18 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-12 18:40:18 -0500
commit794a70f94485fb64ed1c49ba8532895306e2001c (patch)
tree44f096bdc08c2df55ce2278a87ea120ed2bee478 /activesupport/lib/active_support/core_ext/kernel
parentf4e180578c673194f58d4ff5a4a656cc51b2249e (diff)
downloadrails-794a70f94485fb64ed1c49ba8532895306e2001c.tar.gz
rails-794a70f94485fb64ed1c49ba8532895306e2001c.tar.bz2
rails-794a70f94485fb64ed1c49ba8532895306e2001c.zip
update AS/core_ext docs [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/core_ext/kernel')
-rw-r--r--activesupport/lib/active_support/core_ext/kernel/reporting.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
index ad3f9ebec9..bc97da6ef2 100644
--- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb
+++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
@@ -1,7 +1,8 @@
require 'rbconfig'
module Kernel
- # Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards.
+ # Sets $VERBOSE to nil for the duration of the block and back to its original
+ # value afterwards.
#
# silence_warnings do
# value = noisy_call # no warning voiced
@@ -12,12 +13,14 @@ module Kernel
with_warnings(nil) { yield }
end
- # Sets $VERBOSE to true for the duration of the block and back to its original value afterwards.
+ # Sets $VERBOSE to +true+ for the duration of the block and back to its
+ # original value afterwards.
def enable_warnings
with_warnings(true) { yield }
end
- # Sets $VERBOSE for the duration of the block and back to its original value afterwards.
+ # Sets $VERBOSE for the duration of the block and back to its original
+ # value afterwards.
def with_warnings(flag)
old_verbose, $VERBOSE = $VERBOSE, flag
yield
@@ -65,7 +68,6 @@ module Kernel
#
# stream = capture(:stdout) { puts 'Cool' }
# stream # => "Cool\n"
- #
def capture(stream)
begin
stream = stream.to_s
@@ -83,7 +85,6 @@ module Kernel
# Silences both STDOUT and STDERR, even for subprocesses.
#
# quietly { system 'bundle install' }
- #
def quietly
silence_stream(STDOUT) do
silence_stream(STDERR) do