Class Schedule::Day
In: app/models/schedule/day.rb
Parent: Object

Day on a year‘s Schedule::Schedule

Methods

Attributes

events  [RW]  Array of SingleDayEvents
month  [R] 

Public Class methods

[Source]

    # File app/models/schedule/day.rb, line 10
10:     def initialize(month, date)
11:       @date = date
12:       @month = month
13:       @events = []
14:     end

Public Instance methods

1-31

[Source]

    # File app/models/schedule/day.rb, line 21
21:     def day_of_month
22:       @date.day
23:     end

Sunday, Monday, … Saturday

[Source]

    # File app/models/schedule/day.rb, line 26
26:     def day_of_week
27:         Date::DAYNAMES[@date.wday]
28:     end

[Source]

    # File app/models/schedule/day.rb, line 16
16:     def other_month?
17:       @date.month != @month.date.month
18:     end

[Source]

    # File app/models/schedule/day.rb, line 30
30:     def to_s
31:       "#<Schedule::Day #{@date.strftime('%x') if @date}>"
32:     end

[Validate]