Class: DayEntry

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/konkit_worklogger/day_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#get_filename, #minutes_to_time

Constructor Details

#initialize(time_in_minutes, start_time, end_time) ⇒ DayEntry

Returns a new instance of DayEntry.



10
11
12
13
14
# File 'lib/konkit_worklogger/day_entry.rb', line 10

def initialize(time_in_minutes, start_time, end_time)
  @time_in_minutes = time_in_minutes
  @start_time = start_time
  @end_time = end_time
end

Instance Attribute Details

#end_timeObject (readonly)

Returns the value of attribute end_time.



8
9
10
# File 'lib/konkit_worklogger/day_entry.rb', line 8

def end_time
  @end_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



8
9
10
# File 'lib/konkit_worklogger/day_entry.rb', line 8

def start_time
  @start_time
end

#time_in_minutesObject (readonly)

Returns the value of attribute time_in_minutes.



8
9
10
# File 'lib/konkit_worklogger/day_entry.rb', line 8

def time_in_minutes
  @time_in_minutes
end

Instance Method Details

#time_todayObject



16
17
18
# File 'lib/konkit_worklogger/day_entry.rb', line 16

def time_today
  minutes_to_time(@time_in_minutes)
end