class Devlog::Zezzion
Constants
- COD
- COM
Attributes
coding_session_time[RW]
com_session_time[RW]
payed_time[RW]
zzbegin[RW]
zzbegin_line_number[RW]
zzbegin_title[RW]
zzend[RW]
zzend_line_number[RW]
zzend_title[RW]
zztype[RW]
Public Class Methods
new(zztype = COD)
click to toggle source
# File lib/devlog.rb, line 661 def initialize(zztype = COD) @zztype = zztype @zzbegin = nil @zzend = nil @zzbegin = nil @zzbegin_title = nil @zzend_title = nil @coding_session_time = 0.0 @com_session_time = 0.0 @payed_time = 0.0 @zzbegin_line_number = 0 @zzend_line_number = 0 end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/devlog.rb, line 675 def <=>(other) zzbegin <=> other.zzbegin end
days()
click to toggle source
zezzion_time in days
# File lib/devlog.rb, line 685 def days min = self.time / 60 hours = min / 60 days = hours / 24 days end
per_day()
click to toggle source
hours per day
# File lib/devlog.rb, line 698 def per_day # whole time over number of days the parsing covers session_time/days end
per_month()
click to toggle source
# File lib/devlog.rb, line 705 def per_month # todo end
per_week()
click to toggle source
# File lib/devlog.rb, line 702 def per_week # todo end
session_time()
click to toggle source
the whole coding session time
# File lib/devlog.rb, line 693 def session_time @coding_session_time + @com_session_time #in seconds end
time()
click to toggle source
in seconds
# File lib/devlog.rb, line 680 def time @zzend.to_time - @zzbegin.to_time end
to_s()
click to toggle source
# File lib/devlog.rb, line 713 def to_s "#{session_time.round(3)} [h] #{type}, begin on line #{@zzbegin_line_number} at #{@zzbegin}, ends on line #{@zzend_line_number} at #{@zzend}" end
type()
click to toggle source
# File lib/devlog.rb, line 709 def type zztype == 0 ? "CodingSession" : "ComSession" end