class ShiftNote::DaysOfWeekShifts
The days of the week, their shifts.
Public Class Methods
new(data)
click to toggle source
# File lib/shiftnote/days_of_week_shifts.rb, line 3 def initialize(data) @data = data end
Public Instance Methods
days()
click to toggle source
The days in this week, whether working or not. @return [Array<DaysOfWeekShift>] the days in this schedule.
# File lib/shiftnote/days_of_week_shifts.rb, line 9 def days dayz = [] @data.each do |e| dayz.push ShiftNote::DaysOfWeekShift.new(e) end dayz end
raw()
click to toggle source
@return [JSON] the raw data returned by ShiftNote
# File lib/shiftnote/days_of_week_shifts.rb, line 27 def raw @data end
working_days()
click to toggle source
@return [Array<DaysOfWeekShift>] only the days this employee is working.
# File lib/shiftnote/days_of_week_shifts.rb, line 18 def working_days dayz = [] @data.each do |e| dayz.push ShiftNote::DaysOfWeekShift.new(e) unless e['Shifts'].empty? end dayz end