micahwedemeyer-ri_cal 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/.rvmrc +2 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +21 -0
  4. data/History.txt +402 -0
  5. data/Manifest.txt +161 -0
  6. data/README.txt +410 -0
  7. data/Rakefile +66 -0
  8. data/VERSION +1 -0
  9. data/bin/ri_cal +8 -0
  10. data/component_attributes/alarm.yml +10 -0
  11. data/component_attributes/calendar.yml +4 -0
  12. data/component_attributes/component_property_defs.yml +180 -0
  13. data/component_attributes/event.yml +45 -0
  14. data/component_attributes/freebusy.yml +16 -0
  15. data/component_attributes/journal.yml +35 -0
  16. data/component_attributes/timezone.yml +3 -0
  17. data/component_attributes/timezone_period.yml +11 -0
  18. data/component_attributes/todo.yml +46 -0
  19. data/copyrights.txt +1 -0
  20. data/docs/draft-ietf-calsify-2446bis-08.txt +7280 -0
  21. data/docs/draft-ietf-calsify-rfc2445bis-09.txt +10416 -0
  22. data/docs/incrementers.txt +7 -0
  23. data/docs/rfc2445.pdf +0 -0
  24. data/lib/ri_cal/component/alarm.rb +19 -0
  25. data/lib/ri_cal/component/calendar.rb +257 -0
  26. data/lib/ri_cal/component/event.rb +58 -0
  27. data/lib/ri_cal/component/freebusy.rb +16 -0
  28. data/lib/ri_cal/component/journal.rb +27 -0
  29. data/lib/ri_cal/component/non_standard.rb +33 -0
  30. data/lib/ri_cal/component/t_z_info_timezone.rb +153 -0
  31. data/lib/ri_cal/component/timezone/daylight_period.rb +25 -0
  32. data/lib/ri_cal/component/timezone/standard_period.rb +23 -0
  33. data/lib/ri_cal/component/timezone/timezone_period.rb +76 -0
  34. data/lib/ri_cal/component/timezone.rb +197 -0
  35. data/lib/ri_cal/component/todo.rb +42 -0
  36. data/lib/ri_cal/component.rb +256 -0
  37. data/lib/ri_cal/core_extensions/array/conversions.rb +15 -0
  38. data/lib/ri_cal/core_extensions/array.rb +7 -0
  39. data/lib/ri_cal/core_extensions/date/conversions.rb +56 -0
  40. data/lib/ri_cal/core_extensions/date.rb +13 -0
  41. data/lib/ri_cal/core_extensions/date_time/conversions.rb +50 -0
  42. data/lib/ri_cal/core_extensions/date_time.rb +15 -0
  43. data/lib/ri_cal/core_extensions/object/conversions.rb +20 -0
  44. data/lib/ri_cal/core_extensions/object.rb +8 -0
  45. data/lib/ri_cal/core_extensions/string/conversions.rb +57 -0
  46. data/lib/ri_cal/core_extensions/string.rb +8 -0
  47. data/lib/ri_cal/core_extensions/time/calculations.rb +153 -0
  48. data/lib/ri_cal/core_extensions/time/conversions.rb +42 -0
  49. data/lib/ri_cal/core_extensions/time/tzid_access.rb +50 -0
  50. data/lib/ri_cal/core_extensions/time/week_day_predicates.rb +55 -0
  51. data/lib/ri_cal/core_extensions/time.rb +14 -0
  52. data/lib/ri_cal/core_extensions.rb +11 -0
  53. data/lib/ri_cal/fast_date_time.rb +234 -0
  54. data/lib/ri_cal/floating_timezone.rb +32 -0
  55. data/lib/ri_cal/invalid_property_value.rb +8 -0
  56. data/lib/ri_cal/invalid_timezone_identifier.rb +20 -0
  57. data/lib/ri_cal/occurrence_enumerator.rb +265 -0
  58. data/lib/ri_cal/occurrence_period.rb +17 -0
  59. data/lib/ri_cal/parser.rb +145 -0
  60. data/lib/ri_cal/properties/alarm.rb +390 -0
  61. data/lib/ri_cal/properties/calendar.rb +164 -0
  62. data/lib/ri_cal/properties/event.rb +1523 -0
  63. data/lib/ri_cal/properties/freebusy.rb +593 -0
  64. data/lib/ri_cal/properties/journal.rb +1237 -0
  65. data/lib/ri_cal/properties/timezone.rb +150 -0
  66. data/lib/ri_cal/properties/timezone_period.rb +416 -0
  67. data/lib/ri_cal/properties/todo.rb +1559 -0
  68. data/lib/ri_cal/properties.rb +12 -0
  69. data/lib/ri_cal/property_value/array.rb +27 -0
  70. data/lib/ri_cal/property_value/cal_address.rb +11 -0
  71. data/lib/ri_cal/property_value/date.rb +184 -0
  72. data/lib/ri_cal/property_value/date_time/additive_methods.rb +44 -0
  73. data/lib/ri_cal/property_value/date_time/time_machine.rb +159 -0
  74. data/lib/ri_cal/property_value/date_time/timezone_support.rb +100 -0
  75. data/lib/ri_cal/property_value/date_time.rb +359 -0
  76. data/lib/ri_cal/property_value/duration.rb +110 -0
  77. data/lib/ri_cal/property_value/geo.rb +11 -0
  78. data/lib/ri_cal/property_value/integer.rb +12 -0
  79. data/lib/ri_cal/property_value/occurrence_list.rb +144 -0
  80. data/lib/ri_cal/property_value/period.rb +86 -0
  81. data/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb +100 -0
  82. data/lib/ri_cal/property_value/recurrence_rule/enumerator.rb +79 -0
  83. data/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb +148 -0
  84. data/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb +53 -0
  85. data/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb +31 -0
  86. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb +86 -0
  87. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb +31 -0
  88. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb +32 -0
  89. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb +52 -0
  90. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb +31 -0
  91. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb +38 -0
  92. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb +32 -0
  93. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb +69 -0
  94. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb +31 -0
  95. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb +28 -0
  96. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb +80 -0
  97. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb +23 -0
  98. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb +106 -0
  99. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb +23 -0
  100. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb +33 -0
  101. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb +43 -0
  102. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb +28 -0
  103. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb +37 -0
  104. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb +57 -0
  105. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb +135 -0
  106. data/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb +131 -0
  107. data/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +64 -0
  108. data/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb +33 -0
  109. data/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +53 -0
  110. data/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb +42 -0
  111. data/lib/ri_cal/property_value/recurrence_rule/validations.rb +125 -0
  112. data/lib/ri_cal/property_value/recurrence_rule.rb +154 -0
  113. data/lib/ri_cal/property_value/text.rb +44 -0
  114. data/lib/ri_cal/property_value/uri.rb +11 -0
  115. data/lib/ri_cal/property_value/utc_offset.rb +33 -0
  116. data/lib/ri_cal/property_value/zulu_date_time.rb +34 -0
  117. data/lib/ri_cal/property_value.rb +159 -0
  118. data/lib/ri_cal/required_timezones.rb +55 -0
  119. data/lib/ri_cal.rb +187 -0
  120. data/micahwedemeyer-ri_cal.gemspec +227 -0
  121. data/parked_specs/ri_cal/claudio_a_bug_spec.rb +100 -0
  122. data/performance/empty_propval/subject.rb +43 -0
  123. data/performance/paris_eastern/subject.rb +90 -0
  124. data/performance/penultimate_weekday/subject.rb +15 -0
  125. data/performance/psm_big_enum/ical.ics +3171 -0
  126. data/performance/psm_big_enum/subject.rb +16 -0
  127. data/performance/utah_cycling/subject.rb +55 -0
  128. data/sample_ical_files/from_ical_dot_app/test1.ics +38 -0
  129. data/script/benchmark_subject +23 -0
  130. data/script/console +10 -0
  131. data/script/destroy +14 -0
  132. data/script/generate +14 -0
  133. data/script/profile_subject +29 -0
  134. data/script/txt2html +71 -0
  135. data/spec/ri_cal/bugreports_spec.rb +287 -0
  136. data/spec/ri_cal/component/alarm_spec.rb +12 -0
  137. data/spec/ri_cal/component/calendar_spec.rb +88 -0
  138. data/spec/ri_cal/component/event_spec.rb +735 -0
  139. data/spec/ri_cal/component/freebusy_spec.rb +12 -0
  140. data/spec/ri_cal/component/journal_spec.rb +37 -0
  141. data/spec/ri_cal/component/t_z_info_timezone_spec.rb +60 -0
  142. data/spec/ri_cal/component/timezone_spec.rb +236 -0
  143. data/spec/ri_cal/component/todo_spec.rb +112 -0
  144. data/spec/ri_cal/component_spec.rb +224 -0
  145. data/spec/ri_cal/core_extensions/string/conversions_spec.rb +78 -0
  146. data/spec/ri_cal/core_extensions/time/calculations_spec.rb +188 -0
  147. data/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb +45 -0
  148. data/spec/ri_cal/fast_date_time_spec.rb +77 -0
  149. data/spec/ri_cal/inf_loop_spec.rb +78 -0
  150. data/spec/ri_cal/occurrence_enumerator_spec.rb +611 -0
  151. data/spec/ri_cal/parser_spec.rb +337 -0
  152. data/spec/ri_cal/property_value/date_spec.rb +53 -0
  153. data/spec/ri_cal/property_value/date_time_spec.rb +383 -0
  154. data/spec/ri_cal/property_value/duration_spec.rb +126 -0
  155. data/spec/ri_cal/property_value/occurrence_list_spec.rb +72 -0
  156. data/spec/ri_cal/property_value/period_spec.rb +63 -0
  157. data/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb +21 -0
  158. data/spec/ri_cal/property_value/recurrence_rule_spec.rb +1814 -0
  159. data/spec/ri_cal/property_value/text_spec.rb +25 -0
  160. data/spec/ri_cal/property_value/utc_offset_spec.rb +48 -0
  161. data/spec/ri_cal/property_value_spec.rb +125 -0
  162. data/spec/ri_cal/required_timezones_spec.rb +67 -0
  163. data/spec/ri_cal_spec.rb +53 -0
  164. data/spec/spec.opts +4 -0
  165. data/spec/spec_helper.rb +50 -0
  166. data/tasks/gem_loader/load_active_support.rb +3 -0
  167. data/tasks/gem_loader/load_tzinfo_gem.rb +2 -0
  168. data/tasks/ri_cal.rake +412 -0
  169. data/tasks/spec.rake +102 -0
  170. data/website/images/rubytrends.png +0 -0
  171. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  172. data/website/stylesheets/screen.css +159 -0
  173. metadata +307 -0
@@ -0,0 +1,1559 @@
1
+ module RiCal
2
+ module Properties #:nodoc:
3
+ #- ©2009 Rick DeNatale
4
+ #- All rights reserved. Refer to the file README.txt for the license
5
+ #
6
+ # Properties::Todo provides property accessing methods for the Todo class
7
+ # This source file is generated by the rical:gen_propmodules rake tasks, DO NOT EDIT
8
+ module Todo
9
+
10
+ # return the the CLASS property
11
+ # which will be an instances of RiCal::PropertyValueText
12
+ #
13
+ # [purpose (from RFC 2445)]
14
+ # This property defines the access classification for a calendar component.
15
+ #
16
+ # see RFC 2445 4.8.1.3 pp 79-80
17
+ def class_property
18
+ @class_property
19
+ end
20
+
21
+ # set the CLASS property
22
+ # property value should be an instance of RiCal::PropertyValueText
23
+ def class_property=(property_value)
24
+ @class_property = property_value
25
+ end
26
+
27
+ # set the value of the CLASS property
28
+ def security_class=(ruby_value)
29
+ self.class_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
30
+ end
31
+
32
+ # return the value of the CLASS property
33
+ # which will be an instance of String
34
+ def security_class
35
+ class_property ? class_property.ruby_value : nil
36
+ end
37
+
38
+ def class_property_from_string(line) # :nodoc:
39
+ @class_property = RiCal::PropertyValue::Text.new(self, line)
40
+ end
41
+
42
+
43
+ # return the the COMPLETED property
44
+ # which will be an instances of RiCal::PropertyValueDateTime
45
+ #
46
+ # [purpose (from RFC 2445)]
47
+ # This property specifies the date and time that a to-do was actually completed.
48
+ #
49
+ # see RFC 2445 4.8.2.1 pp 90-91
50
+ def completed_property
51
+ @completed_property
52
+ end
53
+
54
+ # set the COMPLETED property
55
+ # property value should be an instance of RiCal::PropertyValueDateTime
56
+ def completed_property=(property_value)
57
+ @completed_property = property_value ? property_value.for_parent(self) : nil
58
+ end
59
+
60
+ # set the value of the COMPLETED property
61
+ def completed=(ruby_value)
62
+ self.completed_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
63
+ end
64
+
65
+ # return the value of the COMPLETED property
66
+ # which will be an instance of DateTime
67
+ def completed
68
+ completed_property ? completed_property.ruby_value : nil
69
+ end
70
+
71
+ def completed_property_from_string(line) # :nodoc:
72
+ @completed_property = RiCal::PropertyValue::DateTime.new(self, line)
73
+ end
74
+
75
+
76
+ # return the the CREATED property
77
+ # which will be an instances of RiCal::PropertyValueZuluDateTime
78
+ #
79
+ # [purpose (from RFC 2445)]
80
+ # This property specifies the date and time that the calendar information was created by teh calendar user agent in the calendar store.
81
+ #
82
+ # see RFC 2445 4.8.7.1 pp 129-130
83
+ def created_property
84
+ @created_property
85
+ end
86
+
87
+ # set the CREATED property
88
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
89
+ def created_property=(property_value)
90
+ @created_property = property_value
91
+ end
92
+
93
+ # set the value of the CREATED property
94
+ def created=(ruby_value)
95
+ self.created_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
96
+ end
97
+
98
+ # return the value of the CREATED property
99
+ # which will be an instance of ZuluDateTime
100
+ def created
101
+ created_property ? created_property.ruby_value : nil
102
+ end
103
+
104
+ def created_property_from_string(line) # :nodoc:
105
+ @created_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
106
+ end
107
+
108
+
109
+ # return the the DESCRIPTION property
110
+ # which will be an instances of RiCal::PropertyValueText
111
+ #
112
+ # [purpose (from RFC 2445)]
113
+ # This property provides a more complete description of the calendar component, than that provided by the "SUMMARY" property.
114
+ #
115
+ # see RFC 2445 4.8.1.5 pp 81-82
116
+ def description_property
117
+ @description_property
118
+ end
119
+
120
+ # set the DESCRIPTION property
121
+ # property value should be an instance of RiCal::PropertyValueText
122
+ def description_property=(property_value)
123
+ @description_property = property_value
124
+ end
125
+
126
+ # set the value of the DESCRIPTION property
127
+ def description=(ruby_value)
128
+ self.description_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
129
+ end
130
+
131
+ # return the value of the DESCRIPTION property
132
+ # which will be an instance of String
133
+ def description
134
+ description_property ? description_property.ruby_value : nil
135
+ end
136
+
137
+ def description_property_from_string(line) # :nodoc:
138
+ @description_property = RiCal::PropertyValue::Text.new(self, line)
139
+ end
140
+
141
+
142
+ # return the the DTSTAMP property
143
+ # which will be an instances of RiCal::PropertyValueZuluDateTime
144
+ #
145
+ # [purpose (from RFC 2445)]
146
+ # This property indicates the date/time that the instance of the iCalendar object was created.
147
+ #
148
+ # see RFC 2445 4.8.7.2 pp 130-131
149
+ def dtstamp_property
150
+ @dtstamp_property
151
+ end
152
+
153
+ # set the DTSTAMP property
154
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
155
+ def dtstamp_property=(property_value)
156
+ @dtstamp_property = property_value
157
+ end
158
+
159
+ # set the value of the DTSTAMP property
160
+ def dtstamp=(ruby_value)
161
+ self.dtstamp_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
162
+ end
163
+
164
+ # return the value of the DTSTAMP property
165
+ # which will be an instance of ZuluDateTime
166
+ def dtstamp
167
+ dtstamp_property ? dtstamp_property.ruby_value : nil
168
+ end
169
+
170
+ def dtstamp_property_from_string(line) # :nodoc:
171
+ @dtstamp_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
172
+ end
173
+
174
+
175
+ # return the the DTSTART property
176
+ # which will be an instances of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
177
+ #
178
+ # [purpose (from RFC 2445)]
179
+ # This property specifies when the calendar component begins.
180
+ #
181
+ # see RFC 2445 4.8.2.4 pp 93-94
182
+ def dtstart_property
183
+ @dtstart_property
184
+ end
185
+
186
+ # set the DTSTART property
187
+ # property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
188
+ def dtstart_property=(property_value)
189
+ @dtstart_property = property_value ? property_value.for_parent(self) : nil
190
+ end
191
+
192
+ # set the value of the DTSTART property
193
+ def dtstart=(ruby_value)
194
+ self.dtstart_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
195
+ end
196
+
197
+ # return the value of the DTSTART property
198
+ # which will be an instance of either DateTime or Date
199
+ def dtstart
200
+ dtstart_property ? dtstart_property.ruby_value : nil
201
+ end
202
+
203
+ def dtstart_property_from_string(line) # :nodoc:
204
+ @dtstart_property = RiCal::PropertyValue::DateTime.or_date(self, line)
205
+ end
206
+
207
+
208
+ # return the the GEO property
209
+ # which will be an instances of RiCal::PropertyValueGeo
210
+ #
211
+ # [purpose (from RFC 2445)]
212
+ # This property specifies information related to the global position for the activity specified by a calendar component.
213
+ #
214
+ # see RFC 2445 4.8.1.6 pp 82-83
215
+ def geo_property
216
+ @geo_property
217
+ end
218
+
219
+ # set the GEO property
220
+ # property value should be an instance of RiCal::PropertyValueGeo
221
+ def geo_property=(property_value)
222
+ @geo_property = property_value
223
+ end
224
+
225
+ # set the value of the GEO property
226
+ def geo=(ruby_value)
227
+ self.geo_property= RiCal::PropertyValue::Geo.convert(self, ruby_value)
228
+ end
229
+
230
+ # return the value of the GEO property
231
+ # which will be an instance of Geo
232
+ def geo
233
+ geo_property ? geo_property.ruby_value : nil
234
+ end
235
+
236
+ def geo_property_from_string(line) # :nodoc:
237
+ @geo_property = RiCal::PropertyValue::Geo.new(self, line)
238
+ end
239
+
240
+
241
+ # return the the LAST-MODIFIED property
242
+ # which will be an instances of RiCal::PropertyValueZuluDateTime
243
+ #
244
+ # [purpose (from RFC 2445)]
245
+ # This property specifies the date and time that the information associated with the calendar component was last revised in teh calendar store.
246
+ #
247
+ # see RFC 2445 4.8.7.3 p 131
248
+ def last_modified_property
249
+ @last_modified_property
250
+ end
251
+
252
+ # set the LAST-MODIFIED property
253
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
254
+ def last_modified_property=(property_value)
255
+ @last_modified_property = property_value
256
+ end
257
+
258
+ # set the value of the LAST-MODIFIED property
259
+ def last_modified=(ruby_value)
260
+ self.last_modified_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
261
+ end
262
+
263
+ # return the value of the LAST-MODIFIED property
264
+ # which will be an instance of ZuluDateTime
265
+ def last_modified
266
+ last_modified_property ? last_modified_property.ruby_value : nil
267
+ end
268
+
269
+ def last_modified_property_from_string(line) # :nodoc:
270
+ @last_modified_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
271
+ end
272
+
273
+
274
+ # return the the LOCATION property
275
+ # which will be an instances of RiCal::PropertyValueText
276
+ #
277
+ # [purpose (from RFC 2445)]
278
+ # This property defines the intended venue for the activity defined by a calendar component.
279
+ #
280
+ # see RFC 2445 4.8.1.7 pp 84
281
+ def location_property
282
+ @location_property
283
+ end
284
+
285
+ # set the LOCATION property
286
+ # property value should be an instance of RiCal::PropertyValueText
287
+ def location_property=(property_value)
288
+ @location_property = property_value
289
+ end
290
+
291
+ # set the value of the LOCATION property
292
+ def location=(ruby_value)
293
+ self.location_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
294
+ end
295
+
296
+ # return the value of the LOCATION property
297
+ # which will be an instance of String
298
+ def location
299
+ location_property ? location_property.ruby_value : nil
300
+ end
301
+
302
+ def location_property_from_string(line) # :nodoc:
303
+ @location_property = RiCal::PropertyValue::Text.new(self, line)
304
+ end
305
+
306
+
307
+ # return the the ORGANIZER property
308
+ # which will be an instances of RiCal::PropertyValueCalAddress
309
+ #
310
+ # [purpose (from RFC 2445)]
311
+ # The property defines the organizer for a calendar component.
312
+ #
313
+ # see RFC 2445 4.8.4.3 pp 106-107
314
+ def organizer_property
315
+ @organizer_property
316
+ end
317
+
318
+ # set the ORGANIZER property
319
+ # property value should be an instance of RiCal::PropertyValueCalAddress
320
+ def organizer_property=(property_value)
321
+ @organizer_property = property_value
322
+ end
323
+
324
+ # set the value of the ORGANIZER property
325
+ def organizer=(ruby_value)
326
+ self.organizer_property= RiCal::PropertyValue::CalAddress.convert(self, ruby_value)
327
+ end
328
+
329
+ # return the value of the ORGANIZER property
330
+ # which will be an instance of CalAddress
331
+ def organizer
332
+ organizer_property ? organizer_property.ruby_value : nil
333
+ end
334
+
335
+ def organizer_property_from_string(line) # :nodoc:
336
+ @organizer_property = RiCal::PropertyValue::CalAddress.new(self, line)
337
+ end
338
+
339
+
340
+ # return the the PERCENT-COMPLETE property
341
+ # which will be an instances of RiCal::PropertyValueInteger
342
+ #
343
+ # [purpose (from RFC 2445)]
344
+ # This property is used by an assignee or delegatee of a to-do to convey the percent completion of a to-do to the Organizer.
345
+ #
346
+ # see RFC 2445 4.8.1.8 pp 85
347
+ def percent_complete_property
348
+ @percent_complete_property
349
+ end
350
+
351
+ # set the PERCENT-COMPLETE property
352
+ # property value should be an instance of RiCal::PropertyValueInteger
353
+ def percent_complete_property=(property_value)
354
+ @percent_complete_property = property_value
355
+ end
356
+
357
+ # set the value of the PERCENT-COMPLETE property
358
+ def percent_complete=(ruby_value)
359
+ self.percent_complete_property= RiCal::PropertyValue::Integer.convert(self, ruby_value)
360
+ end
361
+
362
+ # return the value of the PERCENT-COMPLETE property
363
+ # which will be an instance of Integer
364
+ def percent_complete
365
+ percent_complete_property ? percent_complete_property.ruby_value : nil
366
+ end
367
+
368
+ def percent_complete_property_from_string(line) # :nodoc:
369
+ @percent_complete_property = RiCal::PropertyValue::Integer.new(self, line)
370
+ end
371
+
372
+
373
+ # return the the PRIORITY property
374
+ # which will be an instances of RiCal::PropertyValueInteger
375
+ #
376
+ # [purpose (from RFC 2445)]
377
+ # This property defines the relative priority for a calendar component.
378
+ #
379
+ # see RFC 2445 4.8.1.9 pp 85-87
380
+ def priority_property
381
+ @priority_property
382
+ end
383
+
384
+ # set the PRIORITY property
385
+ # property value should be an instance of RiCal::PropertyValueInteger
386
+ def priority_property=(property_value)
387
+ @priority_property = property_value
388
+ end
389
+
390
+ # set the value of the PRIORITY property
391
+ def priority=(ruby_value)
392
+ self.priority_property= RiCal::PropertyValue::Integer.convert(self, ruby_value)
393
+ end
394
+
395
+ # return the value of the PRIORITY property
396
+ # which will be an instance of Integer
397
+ def priority
398
+ priority_property ? priority_property.ruby_value : nil
399
+ end
400
+
401
+ def priority_property_from_string(line) # :nodoc:
402
+ @priority_property = RiCal::PropertyValue::Integer.new(self, line)
403
+ end
404
+
405
+
406
+ # return the the RECURRENCE-ID property
407
+ # which will be an instances of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
408
+ #
409
+ # [purpose (from RFC 2445)]
410
+ # This property is used in conjunction with the "UID" and "SEQUENCE" property to identify a specific instance of a recurring "VEVENT", "VTODO" or "VJOURNAL" calendar component. The property value is the effective value of the "DTSTART" property of the recurrence instance.
411
+ #
412
+ # see RFC 2445 4.8.4.4 pp 107-109
413
+ def recurrence_id_property
414
+ @recurrence_id_property
415
+ end
416
+
417
+ # set the RECURRENCE-ID property
418
+ # property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
419
+ def recurrence_id_property=(property_value)
420
+ @recurrence_id_property = property_value ? property_value.for_parent(self) : nil
421
+ end
422
+
423
+ # set the value of the RECURRENCE-ID property
424
+ def recurrence_id=(ruby_value)
425
+ self.recurrence_id_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
426
+ end
427
+
428
+ # return the value of the RECURRENCE-ID property
429
+ # which will be an instance of either DateTime or Date
430
+ def recurrence_id
431
+ recurrence_id_property ? recurrence_id_property.ruby_value : nil
432
+ end
433
+
434
+ def recurrence_id_property_from_string(line) # :nodoc:
435
+ @recurrence_id_property = RiCal::PropertyValue::DateTime.or_date(self, line)
436
+ end
437
+
438
+
439
+ # return the the SEQUENCE property
440
+ # which will be an instances of RiCal::PropertyValueInteger
441
+ #
442
+ # [purpose (from RFC 2445)]
443
+ # This property defines the revision sequence number of the calendar component within a sequence of revisions.
444
+ #
445
+ # see RFC 2445 4.8.7.4 pp 131-133
446
+ def sequence_property
447
+ @sequence_property
448
+ end
449
+
450
+ # set the SEQUENCE property
451
+ # property value should be an instance of RiCal::PropertyValueInteger
452
+ def sequence_property=(property_value)
453
+ @sequence_property = property_value
454
+ end
455
+
456
+ # set the value of the SEQUENCE property
457
+ def sequence=(ruby_value)
458
+ self.sequence_property= RiCal::PropertyValue::Integer.convert(self, ruby_value)
459
+ end
460
+
461
+ # return the value of the SEQUENCE property
462
+ # which will be an instance of Integer
463
+ def sequence
464
+ sequence_property ? sequence_property.ruby_value : nil
465
+ end
466
+
467
+ def sequence_property_from_string(line) # :nodoc:
468
+ @sequence_property = RiCal::PropertyValue::Integer.new(self, line)
469
+ end
470
+
471
+
472
+ # return the the STATUS property
473
+ # which will be an instances of RiCal::PropertyValueText
474
+ #
475
+ # [purpose (from RFC 2445)]
476
+ # This property defines a short summary or subject for the calendar component.
477
+ #
478
+ # see RFC 2445 4.8.1.11 pp 80-89
479
+ def status_property
480
+ @status_property
481
+ end
482
+
483
+ # set the STATUS property
484
+ # property value should be an instance of RiCal::PropertyValueText
485
+ def status_property=(property_value)
486
+ @status_property = property_value
487
+ end
488
+
489
+ # set the value of the STATUS property
490
+ def status=(ruby_value)
491
+ self.status_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
492
+ end
493
+
494
+ # return the value of the STATUS property
495
+ # which will be an instance of String
496
+ def status
497
+ status_property ? status_property.ruby_value : nil
498
+ end
499
+
500
+ def status_property_from_string(line) # :nodoc:
501
+ @status_property = RiCal::PropertyValue::Text.new(self, line)
502
+ end
503
+
504
+
505
+ # return the the SUMMARY property
506
+ # which will be an instances of RiCal::PropertyValueText
507
+ #
508
+ # [purpose (from RFC 2445)]
509
+ # This property defines a short summary or subject for the calendar component.
510
+ #
511
+ # see RFC 2445 4.8.1.12 pp 89-90
512
+ def summary_property
513
+ @summary_property
514
+ end
515
+
516
+ # set the SUMMARY property
517
+ # property value should be an instance of RiCal::PropertyValueText
518
+ def summary_property=(property_value)
519
+ @summary_property = property_value
520
+ end
521
+
522
+ # set the value of the SUMMARY property
523
+ def summary=(ruby_value)
524
+ self.summary_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
525
+ end
526
+
527
+ # return the value of the SUMMARY property
528
+ # which will be an instance of String
529
+ def summary
530
+ summary_property ? summary_property.ruby_value : nil
531
+ end
532
+
533
+ def summary_property_from_string(line) # :nodoc:
534
+ @summary_property = RiCal::PropertyValue::Text.new(self, line)
535
+ end
536
+
537
+
538
+ # return the the UID property
539
+ # which will be an instances of RiCal::PropertyValueText
540
+ #
541
+ # [purpose (from RFC 2445)]
542
+ # This property defines the persistent, globally unique identifier for the calendar component.
543
+ #
544
+ # see RFC 2445 4.8.4.7 pp 111-112
545
+ def uid_property
546
+ @uid_property
547
+ end
548
+
549
+ # set the UID property
550
+ # property value should be an instance of RiCal::PropertyValueText
551
+ def uid_property=(property_value)
552
+ @uid_property = property_value
553
+ end
554
+
555
+ # set the value of the UID property
556
+ def uid=(ruby_value)
557
+ self.uid_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
558
+ end
559
+
560
+ # return the value of the UID property
561
+ # which will be an instance of String
562
+ def uid
563
+ uid_property ? uid_property.ruby_value : nil
564
+ end
565
+
566
+ def uid_property_from_string(line) # :nodoc:
567
+ @uid_property = RiCal::PropertyValue::Text.new(self, line)
568
+ end
569
+
570
+
571
+ # return the the URL property
572
+ # which will be an instances of RiCal::PropertyValueUri
573
+ #
574
+ # [purpose (from RFC 2445)]
575
+ # This property defines a Uniform Resource Locator (URL) associated with the iCalendar object.
576
+ #
577
+ # see RFC 2445 4.8.4.6 pp 110-111
578
+ def url_property
579
+ @url_property
580
+ end
581
+
582
+ # set the URL property
583
+ # property value should be an instance of RiCal::PropertyValueUri
584
+ def url_property=(property_value)
585
+ @url_property = property_value
586
+ end
587
+
588
+ # set the value of the URL property
589
+ def url=(ruby_value)
590
+ self.url_property= RiCal::PropertyValue::Uri.convert(self, ruby_value)
591
+ end
592
+
593
+ # return the value of the URL property
594
+ # which will be an instance of Uri
595
+ def url
596
+ url_property ? url_property.ruby_value : nil
597
+ end
598
+
599
+ def url_property_from_string(line) # :nodoc:
600
+ @url_property = RiCal::PropertyValue::Uri.new(self, line)
601
+ end
602
+
603
+
604
+ # return the the DUE property
605
+ # which will be an instances of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
606
+ #
607
+ # [purpose (from RFC 2445)]
608
+ # This property defines the date and time that a to-do is expected to be completed.
609
+ #
610
+ # see RFC 2445 4.8.2.3 pp 92-93
611
+ def due_property
612
+ @due_property
613
+ end
614
+
615
+ # set the DUE property
616
+ # property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
617
+ def due_property=(property_value)
618
+ @due_property = property_value ? property_value.for_parent(self) : nil
619
+ @duration_property = nil
620
+ end
621
+
622
+ # set the value of the DUE property
623
+ def due=(ruby_value)
624
+ self.due_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
625
+ end
626
+
627
+ # return the value of the DUE property
628
+ # which will be an instance of either DateTime or Date
629
+ def due
630
+ due_property ? due_property.ruby_value : nil
631
+ end
632
+
633
+ def due_property_from_string(line) # :nodoc:
634
+ @due_property = RiCal::PropertyValue::DateTime.or_date(self, line)
635
+ end
636
+
637
+
638
+ # return the the DURATION property
639
+ # which will be an instances of RiCal::PropertyValueDuration
640
+ #
641
+ # [purpose (from RFC 2445)]
642
+ # This property specifies a positive duration of time.
643
+ #
644
+ # see RFC 2445 4.8.2.5 pp 94-95
645
+ def duration_property
646
+ @duration_property
647
+ end
648
+
649
+ # set the DURATION property
650
+ # property value should be an instance of RiCal::PropertyValueDuration
651
+ def duration_property=(property_value)
652
+ @duration_property = property_value
653
+ @due_property = nil
654
+ end
655
+
656
+ # set the value of the DURATION property
657
+ def duration=(ruby_value)
658
+ self.duration_property= RiCal::PropertyValue::Duration.convert(self, ruby_value)
659
+ end
660
+
661
+ # return the value of the DURATION property
662
+ # which will be an instance of Duration
663
+ def duration
664
+ duration_property ? duration_property.ruby_value : nil
665
+ end
666
+
667
+ def duration_property_from_string(line) # :nodoc:
668
+ @duration_property = RiCal::PropertyValue::Duration.new(self, line)
669
+ end
670
+
671
+
672
+ # return the the ATTACH property
673
+ # which will be an array of instances of RiCal::PropertyValueUri
674
+ #
675
+ # [purpose (from RFC 2445)]
676
+ # The property provides the capability to associate a document object with a calendar component.
677
+ #
678
+ # see RFC 2445 4.8.1.1 pp 77-78
679
+ def attach_property
680
+ @attach_property ||= []
681
+ end
682
+
683
+ # set the the ATTACH property
684
+ # one or more instances of RiCal::PropertyValueUri may be passed to this method
685
+ def attach_property=(*property_values)
686
+ @attach_property= property_values
687
+ end
688
+
689
+ # set the value of the ATTACH property to multiple values
690
+ # one or more instances of Uri may be passed to this method
691
+ def attachments=(ruby_values)
692
+ @attach_property = ruby_values.map {|val| RiCal::PropertyValue::Uri.convert(self, val)}
693
+ end
694
+
695
+ # set the value of the ATTACH property to a single value
696
+ # one instance of Uri may be passed to this method
697
+ def attach=(ruby_value)
698
+ @attach_property = [RiCal::PropertyValue::Uri.convert(self, ruby_value)]
699
+ end
700
+
701
+ # add one or more values to the ATTACH property
702
+ # one or more instances of Uri may be passed to this method
703
+ def add_attachments(*ruby_values)
704
+ ruby_values.each {|val| self.attach_property << RiCal::PropertyValue::Uri.convert(self, val)}
705
+ end
706
+
707
+ # add one value to the ATTACH property
708
+ # one instances of Uri may be passed to this method
709
+ def add_attach(ruby_value)
710
+ self.attach_property << RiCal::PropertyValue::Uri.convert(self, ruby_value)
711
+ end
712
+
713
+ # remove one or more values from the ATTACH property
714
+ # one or more instances of Uri may be passed to this method
715
+ def remove_attachments(*ruby_values)
716
+ ruby_values.each {|val| self.attach_property.delete(RiCal::PropertyValue::Uri.convert(self, val))}
717
+ end
718
+
719
+ # remove one value from the ATTACH property
720
+ # one instances of Uri may be passed to this method
721
+ def remove_attach(ruby_value)
722
+ self.attach_property.delete(RiCal::PropertyValue::Uri.convert(self, ruby_value))
723
+ end
724
+
725
+ # return the value of the ATTACH property
726
+ # which will be an array of instances of Uri
727
+ def attach
728
+ attach_property.map {|prop| prop ? prop.ruby_value : prop}
729
+ end
730
+
731
+ def attach_property_from_string(line) # :nodoc:
732
+ attach_property << RiCal::PropertyValue::Uri.new(self, line)
733
+ end
734
+
735
+ # return the the ATTENDEE property
736
+ # which will be an array of instances of RiCal::PropertyValueCalAddress
737
+ #
738
+ # [purpose (from RFC 2445)]
739
+ # The property defines an 'Attendee' within a calendar component.
740
+ #
741
+ # see RFC 2445 4.8.4.1 pp 102-104
742
+ def attendee_property
743
+ @attendee_property ||= []
744
+ end
745
+
746
+ # set the the ATTENDEE property
747
+ # one or more instances of RiCal::PropertyValueCalAddress may be passed to this method
748
+ def attendee_property=(*property_values)
749
+ @attendee_property= property_values
750
+ end
751
+
752
+ # set the value of the ATTENDEE property to multiple values
753
+ # one or more instances of CalAddress may be passed to this method
754
+ def attendees=(ruby_values)
755
+ @attendee_property = ruby_values.map {|val| RiCal::PropertyValue::CalAddress.convert(self, val)}
756
+ end
757
+
758
+ # set the value of the ATTENDEE property to a single value
759
+ # one instance of CalAddress may be passed to this method
760
+ def attendee=(ruby_value)
761
+ @attendee_property = [RiCal::PropertyValue::CalAddress.convert(self, ruby_value)]
762
+ end
763
+
764
+ # add one or more values to the ATTENDEE property
765
+ # one or more instances of CalAddress may be passed to this method
766
+ def add_attendees(*ruby_values)
767
+ ruby_values.each {|val| self.attendee_property << RiCal::PropertyValue::CalAddress.convert(self, val)}
768
+ end
769
+
770
+ # add one value to the ATTENDEE property
771
+ # one instances of CalAddress may be passed to this method
772
+ def add_attendee(ruby_value)
773
+ self.attendee_property << RiCal::PropertyValue::CalAddress.convert(self, ruby_value)
774
+ end
775
+
776
+ # remove one or more values from the ATTENDEE property
777
+ # one or more instances of CalAddress may be passed to this method
778
+ def remove_attendees(*ruby_values)
779
+ ruby_values.each {|val| self.attendee_property.delete(RiCal::PropertyValue::CalAddress.convert(self, val))}
780
+ end
781
+
782
+ # remove one value from the ATTENDEE property
783
+ # one instances of CalAddress may be passed to this method
784
+ def remove_attendee(ruby_value)
785
+ self.attendee_property.delete(RiCal::PropertyValue::CalAddress.convert(self, ruby_value))
786
+ end
787
+
788
+ # return the value of the ATTENDEE property
789
+ # which will be an array of instances of CalAddress
790
+ def attendee
791
+ attendee_property.map {|prop| prop ? prop.ruby_value : prop}
792
+ end
793
+
794
+ def attendee_property_from_string(line) # :nodoc:
795
+ attendee_property << RiCal::PropertyValue::CalAddress.new(self, line)
796
+ end
797
+
798
+ # return the the CATEGORIES property
799
+ # which will be an array of instances of RiCal::PropertyValueArray
800
+ #
801
+ # [purpose (from RFC 2445)]
802
+ # This property defines the categories for a calendar component.
803
+ #
804
+ # see RFC 2445 4.8.1.2 pp 78-79
805
+ def categories_property
806
+ @categories_property ||= []
807
+ end
808
+
809
+ # set the the CATEGORIES property
810
+ # one or more instances of RiCal::PropertyValueArray may be passed to this method
811
+ def categories_property=(*property_values)
812
+ @categories_property= property_values
813
+ end
814
+
815
+ # set the value of the CATEGORIES property to multiple values
816
+ # one or more instances of Array may be passed to this method
817
+ def multiple_categories=(ruby_values)
818
+ @categories_property = ruby_values.map {|val| RiCal::PropertyValue::Array.convert(self, val)}
819
+ end
820
+
821
+ # set the value of the CATEGORIES property to a single value
822
+ # one instance of Array may be passed to this method
823
+ def categories=(ruby_value)
824
+ @categories_property = [RiCal::PropertyValue::Array.convert(self, ruby_value)]
825
+ end
826
+
827
+ # add one or more values to the CATEGORIES property
828
+ # one or more instances of Array may be passed to this method
829
+ def add_multiple_categories(*ruby_values)
830
+ ruby_values.each {|val| self.categories_property << RiCal::PropertyValue::Array.convert(self, val)}
831
+ end
832
+
833
+ # add one value to the CATEGORIES property
834
+ # one instances of Array may be passed to this method
835
+ def add_categories(ruby_value)
836
+ self.categories_property << RiCal::PropertyValue::Array.convert(self, ruby_value)
837
+ end
838
+
839
+ # remove one or more values from the CATEGORIES property
840
+ # one or more instances of Array may be passed to this method
841
+ def remove_multiple_categories(*ruby_values)
842
+ ruby_values.each {|val| self.categories_property.delete(RiCal::PropertyValue::Array.convert(self, val))}
843
+ end
844
+
845
+ # remove one value from the CATEGORIES property
846
+ # one instances of Array may be passed to this method
847
+ def remove_categories(ruby_value)
848
+ self.categories_property.delete(RiCal::PropertyValue::Array.convert(self, ruby_value))
849
+ end
850
+
851
+ # return the value of the CATEGORIES property
852
+ # which will be an array of instances of Array
853
+ def categories
854
+ categories_property.map {|prop| prop ? prop.ruby_value : prop}
855
+ end
856
+
857
+ def categories_property_from_string(line) # :nodoc:
858
+ categories_property << RiCal::PropertyValue::Array.new(self, line)
859
+ end
860
+
861
+ # return the the COMMENT property
862
+ # which will be an array of instances of RiCal::PropertyValueText
863
+ #
864
+ # [purpose (from RFC 2445)]
865
+ # This property specifies non-processing information intended to provide a comment to the calendar user.
866
+ #
867
+ # see RFC 2445 4.8.1.4 pp 80-81
868
+ def comment_property
869
+ @comment_property ||= []
870
+ end
871
+
872
+ # set the the COMMENT property
873
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
874
+ def comment_property=(*property_values)
875
+ @comment_property= property_values
876
+ end
877
+
878
+ # set the value of the COMMENT property to multiple values
879
+ # one or more instances of String may be passed to this method
880
+ def comments=(ruby_values)
881
+ @comment_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
882
+ end
883
+
884
+ # set the value of the COMMENT property to a single value
885
+ # one instance of String may be passed to this method
886
+ def comment=(ruby_value)
887
+ @comment_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
888
+ end
889
+
890
+ # add one or more values to the COMMENT property
891
+ # one or more instances of String may be passed to this method
892
+ def add_comments(*ruby_values)
893
+ ruby_values.each {|val| self.comment_property << RiCal::PropertyValue::Text.convert(self, val)}
894
+ end
895
+
896
+ # add one value to the COMMENT property
897
+ # one instances of String may be passed to this method
898
+ def add_comment(ruby_value)
899
+ self.comment_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
900
+ end
901
+
902
+ # remove one or more values from the COMMENT property
903
+ # one or more instances of String may be passed to this method
904
+ def remove_comments(*ruby_values)
905
+ ruby_values.each {|val| self.comment_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
906
+ end
907
+
908
+ # remove one value from the COMMENT property
909
+ # one instances of String may be passed to this method
910
+ def remove_comment(ruby_value)
911
+ self.comment_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
912
+ end
913
+
914
+ # return the value of the COMMENT property
915
+ # which will be an array of instances of String
916
+ def comment
917
+ comment_property.map {|prop| prop ? prop.ruby_value : prop}
918
+ end
919
+
920
+ def comment_property_from_string(line) # :nodoc:
921
+ comment_property << RiCal::PropertyValue::Text.new(self, line)
922
+ end
923
+
924
+ # return the the CONTACT property
925
+ # which will be an array of instances of RiCal::PropertyValueText
926
+ #
927
+ # [purpose (from RFC 2445)]
928
+ # The property is used to represent contact information oralternately a reference to contact information associated with the calendar component.
929
+ #
930
+ # see RFC 2445 4.8.4.2 pp 104-106
931
+ def contact_property
932
+ @contact_property ||= []
933
+ end
934
+
935
+ # set the the CONTACT property
936
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
937
+ def contact_property=(*property_values)
938
+ @contact_property= property_values
939
+ end
940
+
941
+ # set the value of the CONTACT property to multiple values
942
+ # one or more instances of String may be passed to this method
943
+ def contacts=(ruby_values)
944
+ @contact_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
945
+ end
946
+
947
+ # set the value of the CONTACT property to a single value
948
+ # one instance of String may be passed to this method
949
+ def contact=(ruby_value)
950
+ @contact_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
951
+ end
952
+
953
+ # add one or more values to the CONTACT property
954
+ # one or more instances of String may be passed to this method
955
+ def add_contacts(*ruby_values)
956
+ ruby_values.each {|val| self.contact_property << RiCal::PropertyValue::Text.convert(self, val)}
957
+ end
958
+
959
+ # add one value to the CONTACT property
960
+ # one instances of String may be passed to this method
961
+ def add_contact(ruby_value)
962
+ self.contact_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
963
+ end
964
+
965
+ # remove one or more values from the CONTACT property
966
+ # one or more instances of String may be passed to this method
967
+ def remove_contacts(*ruby_values)
968
+ ruby_values.each {|val| self.contact_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
969
+ end
970
+
971
+ # remove one value from the CONTACT property
972
+ # one instances of String may be passed to this method
973
+ def remove_contact(ruby_value)
974
+ self.contact_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
975
+ end
976
+
977
+ # return the value of the CONTACT property
978
+ # which will be an array of instances of String
979
+ def contact
980
+ contact_property.map {|prop| prop ? prop.ruby_value : prop}
981
+ end
982
+
983
+ def contact_property_from_string(line) # :nodoc:
984
+ contact_property << RiCal::PropertyValue::Text.new(self, line)
985
+ end
986
+
987
+ # return the the EXDATE property
988
+ # which will be an array of instances of RiCal::PropertyValueOccurrenceList
989
+ #
990
+ # [purpose (from RFC 2445)]
991
+ # This property defines the list of date/time exceptions for a recurring calendar component.
992
+ #
993
+ # see RFC 2445 4.8.5.1 pp 112-114
994
+ def exdate_property
995
+ @exdate_property ||= []
996
+ end
997
+
998
+ # set the the EXDATE property
999
+ # one or more instances of RiCal::PropertyValueOccurrenceList may be passed to this method
1000
+ def exdate_property=(*property_values)
1001
+ @exdate_property= property_values.map{|prop| prop.for_parent(self)}
1002
+ end
1003
+
1004
+ # set the value of the EXDATE property to multiple values
1005
+ # one or more instances of OccurrenceList may be passed to this method
1006
+ def exdates=(ruby_values)
1007
+ @exdate_property = ruby_values.map {|val| RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
1008
+ end
1009
+
1010
+ # set the value of the EXDATE property to a single value
1011
+ # one instance of OccurrenceList may be passed to this method
1012
+ def exdate=(*ruby_value)
1013
+ @exdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)]
1014
+ end
1015
+
1016
+ # add one or more values to the EXDATE property
1017
+ # one or more instances of OccurrenceList may be passed to this method
1018
+ def add_exdates(*ruby_values)
1019
+ ruby_values.each {|val| self.exdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
1020
+ end
1021
+
1022
+ # add one value to the EXDATE property
1023
+ # one instances of OccurrenceList may be passed to this method
1024
+ def add_exdate(*ruby_value)
1025
+ self.exdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)
1026
+ end
1027
+
1028
+ # remove one or more values from the EXDATE property
1029
+ # one or more instances of OccurrenceList may be passed to this method
1030
+ def remove_exdates(*ruby_values)
1031
+ ruby_values.each {|val| self.exdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *val))}
1032
+ end
1033
+
1034
+ # remove one value from the EXDATE property
1035
+ # one instances of OccurrenceList may be passed to this method
1036
+ def remove_exdate(*ruby_value)
1037
+ self.exdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value))
1038
+ end
1039
+
1040
+ # return the value of the EXDATE property
1041
+ # which will be an array of instances of OccurrenceList
1042
+ def exdate
1043
+ exdate_property.map {|prop| prop ? prop.ruby_value : prop}
1044
+ end
1045
+
1046
+ def exdate_property_from_string(line) # :nodoc:
1047
+ exdate_property << RiCal::PropertyValue::OccurrenceList.new(self, line)
1048
+ end
1049
+
1050
+ # return the the EXRULE property
1051
+ # which will be an array of instances of RiCal::PropertyValueRecurrenceRule
1052
+ #
1053
+ # [purpose (from RFC 2445)]
1054
+ # This property defines a rule or repeating pattern for an exception to a recurrence set.
1055
+ #
1056
+ # see RFC 2445 4.8.5.2 pp 114-125
1057
+ def exrule_property
1058
+ @exrule_property ||= []
1059
+ end
1060
+
1061
+ # set the the EXRULE property
1062
+ # one or more instances of RiCal::PropertyValueRecurrenceRule may be passed to this method
1063
+ def exrule_property=(*property_values)
1064
+ @exrule_property= property_values
1065
+ end
1066
+
1067
+ # set the value of the EXRULE property to multiple values
1068
+ # one or more instances of RecurrenceRule may be passed to this method
1069
+ def exrules=(ruby_values)
1070
+ @exrule_property = ruby_values.map {|val| RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1071
+ end
1072
+
1073
+ # set the value of the EXRULE property to a single value
1074
+ # one instance of RecurrenceRule may be passed to this method
1075
+ def exrule=(ruby_value)
1076
+ @exrule_property = [RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)]
1077
+ end
1078
+
1079
+ # add one or more values to the EXRULE property
1080
+ # one or more instances of RecurrenceRule may be passed to this method
1081
+ def add_exrules(*ruby_values)
1082
+ ruby_values.each {|val| self.exrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1083
+ end
1084
+
1085
+ # add one value to the EXRULE property
1086
+ # one instances of RecurrenceRule may be passed to this method
1087
+ def add_exrule(ruby_value)
1088
+ self.exrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)
1089
+ end
1090
+
1091
+ # remove one or more values from the EXRULE property
1092
+ # one or more instances of RecurrenceRule may be passed to this method
1093
+ def remove_exrules(*ruby_values)
1094
+ ruby_values.each {|val| self.exrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, val))}
1095
+ end
1096
+
1097
+ # remove one value from the EXRULE property
1098
+ # one instances of RecurrenceRule may be passed to this method
1099
+ def remove_exrule(ruby_value)
1100
+ self.exrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value))
1101
+ end
1102
+
1103
+ # return the value of the EXRULE property
1104
+ # which will be an array of instances of RecurrenceRule
1105
+ def exrule
1106
+ exrule_property.map {|prop| prop ? prop.ruby_value : prop}
1107
+ end
1108
+
1109
+ def exrule_property_from_string(line) # :nodoc:
1110
+ exrule_property << RiCal::PropertyValue::RecurrenceRule.new(self, line)
1111
+ end
1112
+
1113
+ # return the the REQUEST-STATUS property
1114
+ # which will be an array of instances of RiCal::PropertyValueText
1115
+ #
1116
+ # see RFC 2445 4.8.8.2 pp 134-136
1117
+ def request_status_property
1118
+ @request_status_property ||= []
1119
+ end
1120
+
1121
+ # set the the REQUEST-STATUS property
1122
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
1123
+ def request_status_property=(*property_values)
1124
+ @request_status_property= property_values
1125
+ end
1126
+
1127
+ # set the value of the REQUEST-STATUS property to multiple values
1128
+ # one or more instances of String may be passed to this method
1129
+ def request_statuses=(ruby_values)
1130
+ @request_status_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
1131
+ end
1132
+
1133
+ # set the value of the REQUEST-STATUS property to a single value
1134
+ # one instance of String may be passed to this method
1135
+ def request_status=(ruby_value)
1136
+ @request_status_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
1137
+ end
1138
+
1139
+ # add one or more values to the REQUEST-STATUS property
1140
+ # one or more instances of String may be passed to this method
1141
+ def add_request_statuses(*ruby_values)
1142
+ ruby_values.each {|val| self.request_status_property << RiCal::PropertyValue::Text.convert(self, val)}
1143
+ end
1144
+
1145
+ # add one value to the REQUEST-STATUS property
1146
+ # one instances of String may be passed to this method
1147
+ def add_request_status(ruby_value)
1148
+ self.request_status_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
1149
+ end
1150
+
1151
+ # remove one or more values from the REQUEST-STATUS property
1152
+ # one or more instances of String may be passed to this method
1153
+ def remove_request_statuses(*ruby_values)
1154
+ ruby_values.each {|val| self.request_status_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
1155
+ end
1156
+
1157
+ # remove one value from the REQUEST-STATUS property
1158
+ # one instances of String may be passed to this method
1159
+ def remove_request_status(ruby_value)
1160
+ self.request_status_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
1161
+ end
1162
+
1163
+ # return the value of the REQUEST-STATUS property
1164
+ # which will be an array of instances of String
1165
+ def request_status
1166
+ request_status_property.map {|prop| prop ? prop.ruby_value : prop}
1167
+ end
1168
+
1169
+ def request_status_property_from_string(line) # :nodoc:
1170
+ request_status_property << RiCal::PropertyValue::Text.new(self, line)
1171
+ end
1172
+
1173
+ # return the the RELATED-TO property
1174
+ # which will be an array of instances of RiCal::PropertyValueText
1175
+ #
1176
+ # [purpose (from RFC 2445)]
1177
+ # The property is used to represent a relationship or reference between one calendar component and another.
1178
+ #
1179
+ # see RFC 2445 4.8.4.5 pp 109-110
1180
+ def related_to_property
1181
+ @related_to_property ||= []
1182
+ end
1183
+
1184
+ # set the the RELATED-TO property
1185
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
1186
+ def related_to_property=(*property_values)
1187
+ @related_to_property= property_values
1188
+ end
1189
+
1190
+ # set the value of the RELATED-TO property to multiple values
1191
+ # one or more instances of String may be passed to this method
1192
+ def multiple_related_to=(ruby_values)
1193
+ @related_to_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
1194
+ end
1195
+
1196
+ # set the value of the RELATED-TO property to a single value
1197
+ # one instance of String may be passed to this method
1198
+ def related_to=(ruby_value)
1199
+ @related_to_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
1200
+ end
1201
+
1202
+ # add one or more values to the RELATED-TO property
1203
+ # one or more instances of String may be passed to this method
1204
+ def add_multiple_related_to(*ruby_values)
1205
+ ruby_values.each {|val| self.related_to_property << RiCal::PropertyValue::Text.convert(self, val)}
1206
+ end
1207
+
1208
+ # add one value to the RELATED-TO property
1209
+ # one instances of String may be passed to this method
1210
+ def add_related_to(ruby_value)
1211
+ self.related_to_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
1212
+ end
1213
+
1214
+ # remove one or more values from the RELATED-TO property
1215
+ # one or more instances of String may be passed to this method
1216
+ def remove_multiple_related_to(*ruby_values)
1217
+ ruby_values.each {|val| self.related_to_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
1218
+ end
1219
+
1220
+ # remove one value from the RELATED-TO property
1221
+ # one instances of String may be passed to this method
1222
+ def remove_related_to(ruby_value)
1223
+ self.related_to_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
1224
+ end
1225
+
1226
+ # return the value of the RELATED-TO property
1227
+ # which will be an array of instances of String
1228
+ def related_to
1229
+ related_to_property.map {|prop| prop ? prop.ruby_value : prop}
1230
+ end
1231
+
1232
+ def related_to_property_from_string(line) # :nodoc:
1233
+ related_to_property << RiCal::PropertyValue::Text.new(self, line)
1234
+ end
1235
+
1236
+ # return the the RESOURCES property
1237
+ # which will be an array of instances of RiCal::PropertyValueArray
1238
+ #
1239
+ # [purpose (from RFC 2445)]
1240
+ # This property defines the equipment or resources anticipated for an activity specified by a calendar entity.
1241
+ #
1242
+ # see RFC 2445 4.8.1.10 pp 87-88
1243
+ def resources_property
1244
+ @resources_property ||= []
1245
+ end
1246
+
1247
+ # set the the RESOURCES property
1248
+ # one or more instances of RiCal::PropertyValueArray may be passed to this method
1249
+ def resources_property=(*property_values)
1250
+ @resources_property= property_values
1251
+ end
1252
+
1253
+ # set the value of the RESOURCES property to multiple values
1254
+ # one or more instances of Array may be passed to this method
1255
+ def multiple_resources=(ruby_values)
1256
+ @resources_property = ruby_values.map {|val| RiCal::PropertyValue::Array.convert(self, val)}
1257
+ end
1258
+
1259
+ # set the value of the RESOURCES property to a single value
1260
+ # one instance of Array may be passed to this method
1261
+ def resources=(ruby_value)
1262
+ @resources_property = [RiCal::PropertyValue::Array.convert(self, ruby_value)]
1263
+ end
1264
+
1265
+ # add one or more values to the RESOURCES property
1266
+ # one or more instances of Array may be passed to this method
1267
+ def add_multiple_resources(*ruby_values)
1268
+ ruby_values.each {|val| self.resources_property << RiCal::PropertyValue::Array.convert(self, val)}
1269
+ end
1270
+
1271
+ # add one value to the RESOURCES property
1272
+ # one instances of Array may be passed to this method
1273
+ def add_resources(ruby_value)
1274
+ self.resources_property << RiCal::PropertyValue::Array.convert(self, ruby_value)
1275
+ end
1276
+
1277
+ # remove one or more values from the RESOURCES property
1278
+ # one or more instances of Array may be passed to this method
1279
+ def remove_multiple_resources(*ruby_values)
1280
+ ruby_values.each {|val| self.resources_property.delete(RiCal::PropertyValue::Array.convert(self, val))}
1281
+ end
1282
+
1283
+ # remove one value from the RESOURCES property
1284
+ # one instances of Array may be passed to this method
1285
+ def remove_resources(ruby_value)
1286
+ self.resources_property.delete(RiCal::PropertyValue::Array.convert(self, ruby_value))
1287
+ end
1288
+
1289
+ # return the value of the RESOURCES property
1290
+ # which will be an array of instances of Array
1291
+ def resources
1292
+ resources_property.map {|prop| prop ? prop.ruby_value : prop}
1293
+ end
1294
+
1295
+ def resources_property_from_string(line) # :nodoc:
1296
+ resources_property << RiCal::PropertyValue::Array.new(self, line)
1297
+ end
1298
+
1299
+ # return the the RDATE property
1300
+ # which will be an array of instances of RiCal::PropertyValueOccurrenceList
1301
+ #
1302
+ # [purpose (from RFC 2445)]
1303
+ # This property defines the list of date/times for a recurring calendar component.
1304
+ #
1305
+ # see RFC 2445 4.8.5.3 pp 115-117
1306
+ def rdate_property
1307
+ @rdate_property ||= []
1308
+ end
1309
+
1310
+ # set the the RDATE property
1311
+ # one or more instances of RiCal::PropertyValueOccurrenceList may be passed to this method
1312
+ def rdate_property=(*property_values)
1313
+ @rdate_property= property_values.map{|prop| prop.for_parent(self)}
1314
+ end
1315
+
1316
+ # set the value of the RDATE property to multiple values
1317
+ # one or more instances of OccurrenceList may be passed to this method
1318
+ def rdates=(ruby_values)
1319
+ @rdate_property = ruby_values.map {|val| RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
1320
+ end
1321
+
1322
+ # set the value of the RDATE property to a single value
1323
+ # one instance of OccurrenceList may be passed to this method
1324
+ def rdate=(*ruby_value)
1325
+ @rdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)]
1326
+ end
1327
+
1328
+ # add one or more values to the RDATE property
1329
+ # one or more instances of OccurrenceList may be passed to this method
1330
+ def add_rdates(*ruby_values)
1331
+ ruby_values.each {|val| self.rdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
1332
+ end
1333
+
1334
+ # add one value to the RDATE property
1335
+ # one instances of OccurrenceList may be passed to this method
1336
+ def add_rdate(*ruby_value)
1337
+ self.rdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)
1338
+ end
1339
+
1340
+ # remove one or more values from the RDATE property
1341
+ # one or more instances of OccurrenceList may be passed to this method
1342
+ def remove_rdates(*ruby_values)
1343
+ ruby_values.each {|val| self.rdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *val))}
1344
+ end
1345
+
1346
+ # remove one value from the RDATE property
1347
+ # one instances of OccurrenceList may be passed to this method
1348
+ def remove_rdate(*ruby_value)
1349
+ self.rdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value))
1350
+ end
1351
+
1352
+ # return the value of the RDATE property
1353
+ # which will be an array of instances of OccurrenceList
1354
+ def rdate
1355
+ rdate_property.map {|prop| prop ? prop.ruby_value : prop}
1356
+ end
1357
+
1358
+ def rdate_property_from_string(line) # :nodoc:
1359
+ rdate_property << RiCal::PropertyValue::OccurrenceList.new(self, line)
1360
+ end
1361
+
1362
+ # return the the RRULE property
1363
+ # which will be an array of instances of RiCal::PropertyValueRecurrenceRule
1364
+ #
1365
+ # [purpose (from RFC 2445)]
1366
+ # This property defines a rule or repeating pattern for recurring events, to-dos, or time zone definitions.
1367
+ #
1368
+ # see RFC 2445 4.8.5.4 pp 117-125
1369
+ def rrule_property
1370
+ @rrule_property ||= []
1371
+ end
1372
+
1373
+ # set the the RRULE property
1374
+ # one or more instances of RiCal::PropertyValueRecurrenceRule may be passed to this method
1375
+ def rrule_property=(*property_values)
1376
+ @rrule_property= property_values
1377
+ end
1378
+
1379
+ # set the value of the RRULE property to multiple values
1380
+ # one or more instances of RecurrenceRule may be passed to this method
1381
+ def rrules=(ruby_values)
1382
+ @rrule_property = ruby_values.map {|val| RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1383
+ end
1384
+
1385
+ # set the value of the RRULE property to a single value
1386
+ # one instance of RecurrenceRule may be passed to this method
1387
+ def rrule=(ruby_value)
1388
+ @rrule_property = [RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)]
1389
+ end
1390
+
1391
+ # add one or more values to the RRULE property
1392
+ # one or more instances of RecurrenceRule may be passed to this method
1393
+ def add_rrules(*ruby_values)
1394
+ ruby_values.each {|val| self.rrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1395
+ end
1396
+
1397
+ # add one value to the RRULE property
1398
+ # one instances of RecurrenceRule may be passed to this method
1399
+ def add_rrule(ruby_value)
1400
+ self.rrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)
1401
+ end
1402
+
1403
+ # remove one or more values from the RRULE property
1404
+ # one or more instances of RecurrenceRule may be passed to this method
1405
+ def remove_rrules(*ruby_values)
1406
+ ruby_values.each {|val| self.rrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, val))}
1407
+ end
1408
+
1409
+ # remove one value from the RRULE property
1410
+ # one instances of RecurrenceRule may be passed to this method
1411
+ def remove_rrule(ruby_value)
1412
+ self.rrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value))
1413
+ end
1414
+
1415
+ # return the value of the RRULE property
1416
+ # which will be an array of instances of RecurrenceRule
1417
+ def rrule
1418
+ rrule_property.map {|prop| prop ? prop.ruby_value : prop}
1419
+ end
1420
+
1421
+ def rrule_property_from_string(line) # :nodoc:
1422
+ rrule_property << RiCal::PropertyValue::RecurrenceRule.new(self, line)
1423
+ end
1424
+
1425
+ def export_properties_to(export_stream) #:nodoc:
1426
+ export_prop_to(export_stream, "RDATE", @rdate_property)
1427
+ export_prop_to(export_stream, "CONTACT", @contact_property)
1428
+ export_prop_to(export_stream, "COMPLETED", @completed_property)
1429
+ export_prop_to(export_stream, "EXDATE", @exdate_property)
1430
+ export_prop_to(export_stream, "CREATED", @created_property)
1431
+ export_prop_to(export_stream, "DURATION", @duration_property)
1432
+ export_prop_to(export_stream, "STATUS", @status_property)
1433
+ export_prop_to(export_stream, "DTSTART", @dtstart_property)
1434
+ export_prop_to(export_stream, "RECURRENCE-ID", @recurrence_id_property)
1435
+ export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
1436
+ export_prop_to(export_stream, "RESOURCES", @resources_property)
1437
+ export_prop_to(export_stream, "CATEGORIES", @categories_property)
1438
+ export_prop_to(export_stream, "DUE", @due_property)
1439
+ export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
1440
+ export_prop_to(export_stream, "PRIORITY", @priority_property)
1441
+ export_prop_to(export_stream, "PERCENT-COMPLETE", @percent_complete_property)
1442
+ export_prop_to(export_stream, "GEO", @geo_property)
1443
+ export_prop_to(export_stream, "ATTENDEE", @attendee_property)
1444
+ export_prop_to(export_stream, "UID", @uid_property)
1445
+ export_prop_to(export_stream, "DESCRIPTION", @description_property)
1446
+ export_prop_to(export_stream, "URL", @url_property)
1447
+ export_prop_to(export_stream, "SUMMARY", @summary_property)
1448
+ export_prop_to(export_stream, "ORGANIZER", @organizer_property)
1449
+ export_prop_to(export_stream, "RRULE", @rrule_property)
1450
+ export_prop_to(export_stream, "ATTACH", @attach_property)
1451
+ export_prop_to(export_stream, "CLASS", @class_property)
1452
+ export_prop_to(export_stream, "RELATED-TO", @related_to_property)
1453
+ export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
1454
+ export_prop_to(export_stream, "EXRULE", @exrule_property)
1455
+ export_prop_to(export_stream, "LOCATION", @location_property)
1456
+ export_prop_to(export_stream, "COMMENT", @comment_property)
1457
+ export_prop_to(export_stream, "SEQUENCE", @sequence_property)
1458
+ end
1459
+
1460
+ def ==(o) #:nodoc:
1461
+ if o.class == self.class
1462
+ (rdate_property == o.rdate_property) &&
1463
+ (contact_property == o.contact_property) &&
1464
+ (completed_property == o.completed_property) &&
1465
+ (exdate_property == o.exdate_property) &&
1466
+ (created_property == o.created_property) &&
1467
+ (duration_property == o.duration_property) &&
1468
+ (status_property == o.status_property) &&
1469
+ (dtstart_property == o.dtstart_property) &&
1470
+ (recurrence_id_property == o.recurrence_id_property) &&
1471
+ (dtstamp_property == o.dtstamp_property) &&
1472
+ (resources_property == o.resources_property) &&
1473
+ (categories_property == o.categories_property) &&
1474
+ (due_property == o.due_property) &&
1475
+ (last_modified_property == o.last_modified_property) &&
1476
+ (priority_property == o.priority_property) &&
1477
+ (percent_complete_property == o.percent_complete_property) &&
1478
+ (geo_property == o.geo_property) &&
1479
+ (attendee_property == o.attendee_property) &&
1480
+ (uid_property == o.uid_property) &&
1481
+ (description_property == o.description_property) &&
1482
+ (url_property == o.url_property) &&
1483
+ (summary_property == o.summary_property) &&
1484
+ (organizer_property == o.organizer_property) &&
1485
+ (rrule_property == o.rrule_property) &&
1486
+ (attach_property == o.attach_property) &&
1487
+ (class_property == o.class_property) &&
1488
+ (related_to_property == o.related_to_property) &&
1489
+ (request_status_property == o.request_status_property) &&
1490
+ (exrule_property == o.exrule_property) &&
1491
+ (location_property == o.location_property) &&
1492
+ (comment_property == o.comment_property) &&
1493
+ (sequence_property == o.sequence_property)
1494
+ else
1495
+ super
1496
+ end
1497
+ end
1498
+
1499
+ def initialize_copy(o) #:nodoc:
1500
+ super
1501
+ rdate_property = rdate_property && rdate_property.dup
1502
+ contact_property = contact_property && contact_property.dup
1503
+ completed_property = completed_property && completed_property.dup
1504
+ exdate_property = exdate_property && exdate_property.dup
1505
+ created_property = created_property && created_property.dup
1506
+ duration_property = duration_property && duration_property.dup
1507
+ status_property = status_property && status_property.dup
1508
+ dtstart_property = dtstart_property && dtstart_property.dup
1509
+ recurrence_id_property = recurrence_id_property && recurrence_id_property.dup
1510
+ dtstamp_property = dtstamp_property && dtstamp_property.dup
1511
+ resources_property = resources_property && resources_property.dup
1512
+ categories_property = categories_property && categories_property.dup
1513
+ due_property = due_property && due_property.dup
1514
+ last_modified_property = last_modified_property && last_modified_property.dup
1515
+ priority_property = priority_property && priority_property.dup
1516
+ percent_complete_property = percent_complete_property && percent_complete_property.dup
1517
+ geo_property = geo_property && geo_property.dup
1518
+ attendee_property = attendee_property && attendee_property.dup
1519
+ uid_property = uid_property && uid_property.dup
1520
+ description_property = description_property && description_property.dup
1521
+ url_property = url_property && url_property.dup
1522
+ summary_property = summary_property && summary_property.dup
1523
+ organizer_property = organizer_property && organizer_property.dup
1524
+ rrule_property = rrule_property && rrule_property.dup
1525
+ attach_property = attach_property && attach_property.dup
1526
+ class_property = class_property && class_property.dup
1527
+ related_to_property = related_to_property && related_to_property.dup
1528
+ request_status_property = request_status_property && request_status_property.dup
1529
+ exrule_property = exrule_property && exrule_property.dup
1530
+ location_property = location_property && location_property.dup
1531
+ comment_property = comment_property && comment_property.dup
1532
+ sequence_property = sequence_property && sequence_property.dup
1533
+ end
1534
+
1535
+ def add_date_times_to(required_timezones) #:nodoc:
1536
+ add_property_date_times_to(required_timezones, dtstart_property)
1537
+ add_property_date_times_to(required_timezones, recurrence_id_property)
1538
+ add_property_date_times_to(required_timezones, due_property)
1539
+ add_property_date_times_to(required_timezones, exdate_property)
1540
+ add_property_date_times_to(required_timezones, rdate_property)
1541
+ end
1542
+
1543
+ module ClassMethods #:nodoc:
1544
+ def property_parser #:nodoc:
1545
+ {"RDATE"=>:rdate_property_from_string, "COMMENT"=>:comment_property_from_string, "LOCATION"=>:location_property_from_string, "CONTACT"=>:contact_property_from_string, "URL"=>:url_property_from_string, "RECURRENCE-ID"=>:recurrence_id_property_from_string, "LAST-MODIFIED"=>:last_modified_property_from_string, "COMPLETED"=>:completed_property_from_string, "CLASS"=>:class_property_from_string, "EXDATE"=>:exdate_property_from_string, "UID"=>:uid_property_from_string, "SEQUENCE"=>:sequence_property_from_string, "PERCENT-COMPLETE"=>:percent_complete_property_from_string, "EXRULE"=>:exrule_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "ORGANIZER"=>:organizer_property_from_string, "GEO"=>:geo_property_from_string, "RRULE"=>:rrule_property_from_string, "RESOURCES"=>:resources_property_from_string, "ATTACH"=>:attach_property_from_string, "CATEGORIES"=>:categories_property_from_string, "SUMMARY"=>:summary_property_from_string, "PRIORITY"=>:priority_property_from_string, "DESCRIPTION"=>:description_property_from_string, "RELATED-TO"=>:related_to_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "DURATION"=>:duration_property_from_string, "DUE"=>:due_property_from_string, "STATUS"=>:status_property_from_string, "DTSTART"=>:dtstart_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string, "CREATED"=>:created_property_from_string}
1546
+ end
1547
+ end
1548
+
1549
+ def self.included(mod) #:nodoc:
1550
+ mod.extend ClassMethods
1551
+ end
1552
+
1553
+ def mutual_exclusion_violation #:nodoc:
1554
+ return true if [:due_property, :duration_property].inject(0) {|sum, prop| send(prop) ? sum + 1 : sum} > 1
1555
+ false
1556
+ end
1557
+ end
1558
+ end
1559
+ end