lib/ballast/concerns/common.rb in ballast-1.1.1 vs lib/ballast/concerns/common.rb in ballast-1.1.2
- old
+ new
@@ -48,10 +48,10 @@
# Formats a short amount of time (less than one hour).
#
# @param amount [Fixnum] The amount to format.
# @param suffix [String] The suffix to add to the formatted amount.
# @return [String] The formatted amount.
- def format_short_amount(amount, suffix)
+ def format_short_amount(amount, suffix = "")
if amount < 1.minute then
"#{amount.floor}s#{suffix}"
elsif amount < 1.hour then
"#{(amount / 60).floor}m#{suffix}"
else
\ No newline at end of file