Module: Devlog::SevendaysTotal
Instance Method Summary collapse
Instance Method Details
#total_hours ⇒ Object
323 324 325 |
# File 'lib/devlog.rb', line 323 def total_hours all.inject(0) { |time, zezzion| time + zezzion.session_time }.round(2) end |
#total_hours_string ⇒ Object
327 328 329 330 331 332 333 |
# File 'lib/devlog.rb', line 327 def total_hours_string total = total_hours return "" if total <= 0 "#{total}h" end |