This method is only available on newer versions.
The first available version (v7.2.3) is shown here.
say_with_time(message)
public
Outputs text along with how long it took to run
its block. If the block returns an integer it assumes it is the number of
rows affected.
# File activerecord/lib/active_record/migration.rb, line 1022
def say_with_time(message)
say(message)
result = nil
time = Benchmark.measure { result = yield }
say "%.4fs" % time.real, :subitem
say("#{result} rows", :subitem) if result.is_a?(Integer)
result
end