Module: Devlog::SevendaysTotal
Instance Method Summary collapse
Instance Method Details
#total_hours ⇒ Object
329 330 331 |
# File 'lib/devlog.rb', line 329 def total_hours ((all.inject(0) { |time, zezzion| time + zezzion.session_time }) / 60 / 60).round(2) end |
#total_hours_string ⇒ Object
333 334 335 336 337 338 339 |
# File 'lib/devlog.rb', line 333 def total_hours_string total = total_hours return "" if total <= 0 "#{total} [h]" end |