Class: DayEntry
- Inherits:
-
Object
- Object
- DayEntry
- Includes:
- Utils
- Defined in:
- lib/konkit_worklogger/day_entry.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#time_in_minutes ⇒ Object
readonly
Returns the value of attribute time_in_minutes.
Instance Method Summary collapse
-
#initialize(time_in_minutes, start_time, end_time) ⇒ DayEntry
constructor
A new instance of DayEntry.
- #time_today ⇒ Object
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_time ⇒ Object (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_time ⇒ Object (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_minutes ⇒ Object (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_today ⇒ Object
16 17 18 |
# File 'lib/konkit_worklogger/day_entry.rb', line 16 def time_today minutes_to_time(@time_in_minutes) end |