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
- #_instance_to_xml ⇒ Object
-
#event_status ⇒ String
イベントのステータス.
- #instance_to_xml ⇒ Object
-
#to_vevent ⇒ When::V::Event
(also: #vevent)
When::V::Event オブジェクトへの変換.
Instance Attribute Details
Instance Method Details
#_instance_to_xml ⇒ Object
30 |
# File 'lib/when_exe/obsolete/googlecalendar.rb', line 30 alias :_instance_to_xml :instance_to_xml |
#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 |
#instance_to_xml ⇒ Object
33 34 35 36 |
# File 'lib/when_exe/obsolete/googlecalendar.rb', line 33 def instance_to_xml _instance_to_xml @xml.root.elements[recurrence ? "gd:when" : "gd:recurrence"].remove 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 |