Class: CalExporter::CLI
- Inherits:
-
Thor
- Object
- Thor
- CalExporter::CLI
- Defined in:
- lib/cal_exporter.rb
Instance Method Summary collapse
Instance Method Details
#calender(calendar_id, format, save_location) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cal_exporter.rb', line 13 def calender(calendar_id, format, save_location) import = Importer.new(calendar_id) calendars = import.fetch export = Exporter.new(format, save_location) calendars.each do |calendar| calendar.events.each do |event| say export.save_as_jekyll(event) end end say "Successfully created Files under #{save_location}.", :green end |