Module: ScheduleScraper::Event
- Included in:
- Pointstreak::Event
- Defined in:
- lib/schedule-scraper/event.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
9 10 11 |
# File 'lib/schedule-scraper/event.rb', line 9 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#to_csv ⇒ Object
13 14 15 16 17 |
# File 'lib/schedule-scraper/event.rb', line 13 def to_csv self.class.export_fields.collect do |field| self.send(field) end end |
#to_gcal ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/schedule-scraper/event.rb', line 19 def to_gcal [ title, start_date, start_time, end_date, "", all_day?, description, "", private? ] end |
#to_ical(cal) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/schedule-scraper/event.rb', line 33 def to_ical(cal) cal.event do |event| event.summary description event.dtstart start_date_time event.dtend end_date_time event.location "" end end |