| Class | Schedule::Week |
| In: |
app/models/schedule/week.rb
|
| Parent: | Object |
Week in yearly Schedule::Schedule
| days | [R] | Array of Days |
start_date must be Sunday month is the owning month, and may be the different (next) month
# File app/models/schedule/week.rb, line 10
10: def initialize(month, start_date)
11: @start_date = start_date
12: if start_date.wday != 0
13: raise(ArgumentError, "Must start on Sunday")
14: end
15: @days = []
16: (start_date..start_date + 6).each do |date|
17: @days << Day.new(month, date)
18: end
19: end