Class: Toggl::Worktime::Day

Inherits:
Object
  • Object
show all
Defined in:
lib/toggl/worktime/calendar.rb

Overview

One-day datum

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dayObject (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

#formatObject



88
89
90
# File 'lib/toggl/worktime/calendar.rb', line 88

def format
  "Day: #{day.day}\n#{@begin}-#{@end}\n#{@time}"
end