Class: TimeTracker::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/time_tracker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ Entry

Returns a new instance of Entry.



61
62
63
64
65
66
# File 'lib/time_tracker.rb', line 61

def initialize event
  @start_time = event.dtstart
  @end_time = event.dtend
  @summary = event.summary
  @duration = calculate_duration 
end

Instance Attribute Details

#break_timeObject (readonly)

Returns the value of attribute break_time.



59
60
61
# File 'lib/time_tracker.rb', line 59

def break_time
  @break_time
end

#durationObject

Returns the value of attribute duration.



58
59
60
# File 'lib/time_tracker.rb', line 58

def duration
  @duration
end

#end_timeObject

Returns the value of attribute end_time.



58
59
60
# File 'lib/time_tracker.rb', line 58

def end_time
  @end_time
end

#start_timeObject

Returns the value of attribute start_time.



58
59
60
# File 'lib/time_tracker.rb', line 58

def start_time
  @start_time
end

#summaryObject

Returns the value of attribute summary.



58
59
60
# File 'lib/time_tracker.rb', line 58

def summary
  @summary
end