Method: GoogleCalendar::Event#to_vevent

Defined in:
lib/when_exe/obsolete/googlecalendar.rb

#to_veventWhen::V::Event Also known as: vevent

When::V::Event オブジェクトへの変換

Returns:



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/when_exe/obsolete/googlecalendar.rb', line 42

def to_vevent
  options = {'summary'=>@title, 'description'=>@desc, 'location'=>@where}
  if @recurrence
    @recurrence.each_line do |line|
      options[$1.downcase] ||= $2 if line =~ /^(DTSTART|DTEND|RRULE).(.+)$/i
    end
  else
    options.update({'dtstart'=>When.when?(@st), 'dtend'=>When.when?(@en)})
  end
  When::V::Event.new(options)
end