class Markdo::IcsExporter::Event
Public Class Methods
new(date_start, date_end, summary)
click to toggle source
# File lib/markdo/ics_exporter.rb, line 48 def initialize(date_start, date_end, summary) @date_start = date_start @date_end = date_end @summary = summary end
Public Instance Methods
to_ics()
click to toggle source
# File lib/markdo/ics_exporter.rb, line 54 def to_ics buf = [] buf << 'BEGIN:VEVENT' buf << "DTSTART;VALUE=DATE:#{@date_start.strftime('%Y%m%d')}" buf << "DTEND;VALUE=DATE:#{@date_end.strftime('%Y%m%d')}" buf << "SUMMARY:#{@summary}" buf << 'END:VEVENT' buf.join("\n") end