Class: TimeTracker::Entry
- Inherits:
-
Object
- Object
- TimeTracker::Entry
- Defined in:
- lib/time_tracker.rb
Instance Attribute Summary collapse
-
#break_time ⇒ Object
readonly
Returns the value of attribute break_time.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(event) ⇒ Entry
constructor
A new instance of Entry.
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_time ⇒ Object (readonly)
Returns the value of attribute break_time.
59 60 61 |
# File 'lib/time_tracker.rb', line 59 def break_time @break_time end |
#duration ⇒ Object
Returns the value of attribute duration.
58 59 60 |
# File 'lib/time_tracker.rb', line 58 def duration @duration end |
#end_time ⇒ Object
Returns the value of attribute end_time.
58 59 60 |
# File 'lib/time_tracker.rb', line 58 def end_time @end_time end |
#start_time ⇒ Object
Returns the value of attribute start_time.
58 59 60 |
# File 'lib/time_tracker.rb', line 58 def start_time @start_time end |
#summary ⇒ Object
Returns the value of attribute summary.
58 59 60 |
# File 'lib/time_tracker.rb', line 58 def summary @summary end |