This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires the following gems: net/http, chronic, icalendar, ice_cube | |
#for ice_cube, I had to use a branch that had not yet been pulled into master. | |
#In gemfile: gem 'ice_cube', :git => 'https://github.com/spra85/ice_cube.git' | |
class LibraryHoursCalendarBuilder | |
def get_hours | |
@calendars = LibraryHoursCalendar.all.order( "sort_order ASC" ) | |
@calendars.each do |calendar| | |
#For each calendar, get the ical file from Google and parse it |