Class: GoogleCalendar::Event
- Inherits:
-
Object
- Object
- GoogleCalendar::Event
- Defined in:
- lib/when_exe/obsolete/googlecalendar.rb
Overview
gcalapi の GoogleCalendar::Event クラスへの機能追加
Instance Attribute Summary collapse
-
#recurrence ⇒ Array<String>
繰り返しイベントの定義.
Instance Method Summary collapse
-
#event_status ⇒ String
イベントのステータス.
-
#to_vevent ⇒ When::V::Event
(also: #vevent)
When::V::Event オブジェクトへの変換.
Instance Attribute Details
Instance Method Details
#event_status ⇒ String
イベントのステータス
61 62 63 |
# File 'lib/when_exe/obsolete/googlecalendar.rb', line 61 def event_status @xml.root.elements['gd:eventStatus'].attributes['value'][/[^.]+$/] end |
#to_vevent ⇒ When::V::Event Also known as: vevent
When::V::Event オブジェクトへの変換
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/when_exe/obsolete/googlecalendar.rb', line 42 def to_vevent = {'summary'=>@title, 'description'=>@desc, 'location'=>@where} if @recurrence @recurrence.each_line do |line| [$1.downcase] ||= $2 if line =~ /^(DTSTART|DTEND|RRULE).(.+)$/i end else .update({'dtstart'=>When.when?(@st), 'dtend'=>When.when?(@en)}) end When::V::Event.new() end |