Class: Toggl::Worktime::Day
- Inherits:
-
Object
- Object
- Toggl::Worktime::Day
- Defined in:
- lib/toggl/worktime/calendar.rb
Overview
One-day datum
Instance Attribute Summary collapse
-
#day ⇒ Object
readonly
Returns the value of attribute day.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(day, time, begin_at, end_at) ⇒ Day
constructor
A new instance of Day.
Constructor Details
#initialize(day, time, begin_at, end_at) ⇒ Day
Returns a new instance of Day.
81 82 83 84 85 86 |
# File 'lib/toggl/worktime/calendar.rb', line 81 def initialize(day, time, begin_at, end_at) @day = day @time = time @begin = begin_at @end = end_at end |
Instance Attribute Details
#day ⇒ Object (readonly)
Returns the value of attribute day.
79 80 81 |
# File 'lib/toggl/worktime/calendar.rb', line 79 def day @day end |
Instance Method Details
#format ⇒ Object
88 89 90 |
# File 'lib/toggl/worktime/calendar.rb', line 88 def format "Day: #{day.day}\n#{@begin}-#{@end}\n#{@time}" end |