Class: Totals::DecimalFormatter

Inherits:
Object
  • Object
show all
Includes:
Formatter
Defined in:
lib/totals.rb

Instance Attribute Summary

Attributes included from Formatter

#seconds

Instance Method Summary collapse

Methods included from Formatter

#initialize

Instance Method Details

#formatObject


25
26
27
# File 'lib/totals.rb', line 25

def format
  (seconds / 3600.0).round(1).left_pad(:with => ' ', :length => 4)
end