Class: Calendars
- Inherits:
-
Object
- Object
- Calendars
- Defined in:
- lib/calendars.rb
Overview
Container for calendars read from configuration.
Instance Method Summary collapse
-
#display?(title) ⇒ Boolean
Checks if any calendar match title.
-
#forward(title) ⇒ Object
Returns how many days in the future calendar should be chcecked.
-
#initialize(calendars) ⇒ Calendars
constructor
A new instance of Calendars.
Constructor Details
Instance Method Details
#display?(title) ⇒ Boolean
Checks if any calendar match title.
43 44 45 46 47 48 49 |
# File 'lib/calendars.rb', line 43 def display?(title) cal = @calendars.find { |cal| cal.match?(title) } return cal.display unless cal.nil? return true; end |
#forward(title) ⇒ Object
Returns how many days in the future calendar should be chcecked.
52 53 54 55 56 57 58 |
# File 'lib/calendars.rb', line 52 def forward(title) cal = @calendars.find { |cal| cal.match?(title) } return cal.forward unless cal.nil? return 0; end |