Class: Calendar
- Inherits:
-
Object
- Object
- Calendar
- Defined in:
- app/models/calendar.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
Instance Method Summary collapse
- #event_strips ⇒ Object
- #events ⇒ Object
-
#initialize(date) ⇒ Calendar
constructor
A new instance of Calendar.
Constructor Details
#initialize(date) ⇒ Calendar
Returns a new instance of Calendar.
2 3 4 |
# File 'app/models/calendar.rb', line 2 def initialize(date) @date = date end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
14 15 16 |
# File 'app/models/calendar.rb', line 14 def date @date end |
Instance Method Details
#event_strips ⇒ Object
10 11 12 |
# File 'app/models/calendar.rb', line 10 def event_strips Event.event_strips_for_month(@date) end |
#events ⇒ Object
6 7 8 |
# File 'app/models/calendar.rb', line 6 def events event_strips.flatten.compact end |