-
-
Save stopthink/371522 to your computer and use it in GitHub Desktop.
| # Load format-specific drivers in the following order: | |
| $SourceParserImplementations = [] | |
| SourceParser::Upcoming | |
| SourceParser::Ical | |
| SourceParser::Hcal |
for reference, I'm pulling code from http://github.com/calagator/calagator
I have cloned a copy of the Calagator project and am able to run it successfully on my machine. I've attempted to copy over just the components required for importing events, but clearly I've missed something, because it does not work in my project.
It appears that source_parser, and its siblings ical, upcoming, etc are classes.
source_parser.rb: http://github.com/calagator/calagator/blob/master/app/models/source_parser.rb
upcoming.rb: http://github.com/calagator/calagator/blob/master/app/models/source_parser/upcoming.rb
Try just moving source_parser.rb and the source_parser folder into the lib folder. The classes should then be included automatically by Rails.
Is SourceParser a class or a module? If it's a class and he's inheriting from SourceParser, he would use the "<" sig, if it's a module that the Upcoming, Ical, Hcal classes are included in, he'd use the "::" sig. Right?