File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -831,10 +831,14 @@ def announce(message)
831831 write "== %s %s" % [ text , "=" * length ]
832832 end
833833
834+ # Takes a message argument and outputs it as is.
835+ # A second boolean argument can be passed to specify whether to indent or not.
834836 def say ( message , subitem = false )
835837 write "#{ subitem ? " ->" : "--" } #{ message } "
836838 end
837839
840+ # Outputs text along with how long it took to run its block.
841+ # If the block returns an integer it assumes it is the number of rows affected.
838842 def say_with_time ( message )
839843 say ( message )
840844 result = nil
@@ -844,6 +848,7 @@ def say_with_time(message)
844848 result
845849 end
846850
851+ # Takes a block as an argument and suppresses any output generated by the block.
847852 def suppress_messages
848853 save , self . verbose = verbose , false
849854 yield
You can’t perform that action at this time.
0 commit comments