module Devlog::SevendaysTotal

Public Instance Methods

total_hours() click to toggle source
# File lib/devlog.rb, line 323
def total_hours
  all.inject(0) { |time, zezzion| time + zezzion.session_time }.round(2)
end
total_hours_string() click to toggle source
# File lib/devlog.rb, line 327
def total_hours_string
  total = total_hours

  return "" if total <= 0

  "#{total}h"
end