ri_cal 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/History.txt +45 -0
  2. data/Manifest.txt +129 -0
  3. data/README.txt +394 -0
  4. data/Rakefile +31 -0
  5. data/bin/ri_cal +8 -0
  6. data/component_attributes/alarm.yml +10 -0
  7. data/component_attributes/calendar.yml +4 -0
  8. data/component_attributes/component_property_defs.yml +180 -0
  9. data/component_attributes/event.yml +45 -0
  10. data/component_attributes/freebusy.yml +16 -0
  11. data/component_attributes/journal.yml +35 -0
  12. data/component_attributes/timezone.yml +3 -0
  13. data/component_attributes/timezone_period.yml +11 -0
  14. data/component_attributes/todo.yml +46 -0
  15. data/copyrights.txt +1 -0
  16. data/docs/draft-ietf-calsify-2446bis-08.txt +7280 -0
  17. data/docs/draft-ietf-calsify-rfc2445bis-09.txt +10416 -0
  18. data/docs/incrementers.txt +7 -0
  19. data/docs/rfc2445.pdf +0 -0
  20. data/lib/ri_cal.rb +144 -0
  21. data/lib/ri_cal/component.rb +247 -0
  22. data/lib/ri_cal/component/alarm.rb +21 -0
  23. data/lib/ri_cal/component/calendar.rb +219 -0
  24. data/lib/ri_cal/component/event.rb +60 -0
  25. data/lib/ri_cal/component/freebusy.rb +18 -0
  26. data/lib/ri_cal/component/journal.rb +30 -0
  27. data/lib/ri_cal/component/t_z_info_timezone.rb +123 -0
  28. data/lib/ri_cal/component/timezone.rb +196 -0
  29. data/lib/ri_cal/component/timezone/daylight_period.rb +25 -0
  30. data/lib/ri_cal/component/timezone/standard_period.rb +23 -0
  31. data/lib/ri_cal/component/timezone/timezone_period.rb +53 -0
  32. data/lib/ri_cal/component/todo.rb +43 -0
  33. data/lib/ri_cal/core_extensions.rb +6 -0
  34. data/lib/ri_cal/core_extensions/array.rb +7 -0
  35. data/lib/ri_cal/core_extensions/array/conversions.rb +15 -0
  36. data/lib/ri_cal/core_extensions/date.rb +13 -0
  37. data/lib/ri_cal/core_extensions/date/conversions.rb +61 -0
  38. data/lib/ri_cal/core_extensions/date_time.rb +15 -0
  39. data/lib/ri_cal/core_extensions/date_time/conversions.rb +50 -0
  40. data/lib/ri_cal/core_extensions/object.rb +8 -0
  41. data/lib/ri_cal/core_extensions/object/conversions.rb +20 -0
  42. data/lib/ri_cal/core_extensions/string.rb +8 -0
  43. data/lib/ri_cal/core_extensions/string/conversions.rb +63 -0
  44. data/lib/ri_cal/core_extensions/time.rb +13 -0
  45. data/lib/ri_cal/core_extensions/time/calculations.rb +153 -0
  46. data/lib/ri_cal/core_extensions/time/conversions.rb +61 -0
  47. data/lib/ri_cal/core_extensions/time/tzid_access.rb +50 -0
  48. data/lib/ri_cal/core_extensions/time/week_day_predicates.rb +88 -0
  49. data/lib/ri_cal/floating_timezone.rb +32 -0
  50. data/lib/ri_cal/invalid_property_value.rb +8 -0
  51. data/lib/ri_cal/invalid_timezone_identifer.rb +20 -0
  52. data/lib/ri_cal/occurrence_enumerator.rb +206 -0
  53. data/lib/ri_cal/occurrence_period.rb +17 -0
  54. data/lib/ri_cal/parser.rb +138 -0
  55. data/lib/ri_cal/properties/alarm.rb +390 -0
  56. data/lib/ri_cal/properties/calendar.rb +164 -0
  57. data/lib/ri_cal/properties/event.rb +1526 -0
  58. data/lib/ri_cal/properties/freebusy.rb +594 -0
  59. data/lib/ri_cal/properties/journal.rb +1240 -0
  60. data/lib/ri_cal/properties/timezone.rb +151 -0
  61. data/lib/ri_cal/properties/timezone_period.rb +416 -0
  62. data/lib/ri_cal/properties/todo.rb +1562 -0
  63. data/lib/ri_cal/property_value.rb +149 -0
  64. data/lib/ri_cal/property_value/array.rb +27 -0
  65. data/lib/ri_cal/property_value/cal_address.rb +11 -0
  66. data/lib/ri_cal/property_value/date.rb +175 -0
  67. data/lib/ri_cal/property_value/date_time.rb +335 -0
  68. data/lib/ri_cal/property_value/date_time/additive_methods.rb +44 -0
  69. data/lib/ri_cal/property_value/date_time/time_machine.rb +181 -0
  70. data/lib/ri_cal/property_value/date_time/timezone_support.rb +96 -0
  71. data/lib/ri_cal/property_value/duration.rb +110 -0
  72. data/lib/ri_cal/property_value/geo.rb +11 -0
  73. data/lib/ri_cal/property_value/integer.rb +12 -0
  74. data/lib/ri_cal/property_value/occurrence_list.rb +144 -0
  75. data/lib/ri_cal/property_value/period.rb +82 -0
  76. data/lib/ri_cal/property_value/recurrence_rule.rb +145 -0
  77. data/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb +97 -0
  78. data/lib/ri_cal/property_value/recurrence_rule/enumerator.rb +79 -0
  79. data/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb +148 -0
  80. data/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb +53 -0
  81. data/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb +31 -0
  82. data/lib/ri_cal/property_value/recurrence_rule/occurence_incrementer.rb +793 -0
  83. data/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb +131 -0
  84. data/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +60 -0
  85. data/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb +33 -0
  86. data/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +49 -0
  87. data/lib/ri_cal/property_value/recurrence_rule/validations.rb +125 -0
  88. data/lib/ri_cal/property_value/text.rb +40 -0
  89. data/lib/ri_cal/property_value/uri.rb +11 -0
  90. data/lib/ri_cal/property_value/utc_offset.rb +33 -0
  91. data/lib/ri_cal/required_timezones.rb +55 -0
  92. data/ri_cal.gemspec +49 -0
  93. data/sample_ical_files/from_ical_dot_app/test1.ics +38 -0
  94. data/script/console +10 -0
  95. data/script/destroy +14 -0
  96. data/script/generate +14 -0
  97. data/script/txt2html +71 -0
  98. data/spec/ri_cal/component/alarm_spec.rb +12 -0
  99. data/spec/ri_cal/component/calendar_spec.rb +54 -0
  100. data/spec/ri_cal/component/event_spec.rb +601 -0
  101. data/spec/ri_cal/component/freebusy_spec.rb +12 -0
  102. data/spec/ri_cal/component/journal_spec.rb +37 -0
  103. data/spec/ri_cal/component/t_z_info_timezone_spec.rb +36 -0
  104. data/spec/ri_cal/component/timezone_spec.rb +218 -0
  105. data/spec/ri_cal/component/todo_spec.rb +112 -0
  106. data/spec/ri_cal/component_spec.rb +224 -0
  107. data/spec/ri_cal/core_extensions/string/conversions_spec.rb +78 -0
  108. data/spec/ri_cal/core_extensions/time/calculations_spec.rb +188 -0
  109. data/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb +45 -0
  110. data/spec/ri_cal/occurrence_enumerator_spec.rb +573 -0
  111. data/spec/ri_cal/parser_spec.rb +303 -0
  112. data/spec/ri_cal/property_value/date_spec.rb +53 -0
  113. data/spec/ri_cal/property_value/date_time_spec.rb +383 -0
  114. data/spec/ri_cal/property_value/duration_spec.rb +126 -0
  115. data/spec/ri_cal/property_value/occurrence_list_spec.rb +72 -0
  116. data/spec/ri_cal/property_value/period_spec.rb +49 -0
  117. data/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb +21 -0
  118. data/spec/ri_cal/property_value/recurrence_rule_spec.rb +1814 -0
  119. data/spec/ri_cal/property_value/text_spec.rb +25 -0
  120. data/spec/ri_cal/property_value/utc_offset_spec.rb +48 -0
  121. data/spec/ri_cal/property_value_spec.rb +125 -0
  122. data/spec/ri_cal/required_timezones_spec.rb +67 -0
  123. data/spec/ri_cal_spec.rb +53 -0
  124. data/spec/spec.opts +4 -0
  125. data/spec/spec_helper.rb +46 -0
  126. data/tasks/gem_loader/load_active_support.rb +3 -0
  127. data/tasks/gem_loader/load_tzinfo_gem.rb +2 -0
  128. data/tasks/ri_cal.rake +410 -0
  129. data/tasks/spec.rake +50 -0
  130. metadata +221 -0
@@ -0,0 +1,1240 @@
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::Journal provides property accessing methods for the Journal class
7
+ # This source file is generated by the rical:gen_propmodules rake tasks, DO NOT EDIT
8
+ module Journal
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 CREATED 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 the calendar information was created by teh calendar user agent in the calendar store.
48
+ #
49
+ # see RFC 2445 4.8.7.1 pp 129-130
50
+ def created_property
51
+ @created_property
52
+ end
53
+
54
+ # set the CREATED property
55
+ # property value should be an instance of RiCal::PropertyValueDateTime
56
+ def created_property=(property_value)
57
+ @created_property = property_value ? property_value.for_parent(self) : nil
58
+ end
59
+
60
+ # set the value of the CREATED property
61
+ def created=(ruby_value)
62
+ self.created_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
63
+ end
64
+
65
+ # return the value of the CREATED property
66
+ # which will be an instance of DateTime
67
+ def created
68
+ created_property ? created_property.ruby_value : nil
69
+ end
70
+
71
+ def created_property_from_string(line) # :nodoc:
72
+ @created_property = RiCal::PropertyValue::DateTime.new(self, line)
73
+ end
74
+
75
+
76
+ # return the the DESCRIPTION property
77
+ # which will be an instances of RiCal::PropertyValueText
78
+ #
79
+ # [purpose (from RFC 2445)]
80
+ # This property provides a more complete description of the calendar component, than that provided by the "SUMMARY" property.
81
+ #
82
+ # see RFC 2445 4.8.1.5 pp 81-82
83
+ def description_property
84
+ @description_property
85
+ end
86
+
87
+ # set the DESCRIPTION property
88
+ # property value should be an instance of RiCal::PropertyValueText
89
+ def description_property=(property_value)
90
+ @description_property = property_value
91
+ end
92
+
93
+ # set the value of the DESCRIPTION property
94
+ def description=(ruby_value)
95
+ self.description_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
96
+ end
97
+
98
+ # return the value of the DESCRIPTION property
99
+ # which will be an instance of String
100
+ def description
101
+ description_property ? description_property.ruby_value : nil
102
+ end
103
+
104
+ def description_property_from_string(line) # :nodoc:
105
+ @description_property = RiCal::PropertyValue::Text.new(self, line)
106
+ end
107
+
108
+
109
+ # return the the DTSTART property
110
+ # which will be an instances of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
111
+ #
112
+ # [purpose (from RFC 2445)]
113
+ # This property specifies when the calendar component begins.
114
+ #
115
+ # see RFC 2445 4.8.2.4 pp 93-94
116
+ def dtstart_property
117
+ @dtstart_property
118
+ end
119
+
120
+ # set the DTSTART property
121
+ # property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
122
+ def dtstart_property=(property_value)
123
+ @dtstart_property = property_value ? property_value.for_parent(self) : nil
124
+ end
125
+
126
+ # set the value of the DTSTART property
127
+ def dtstart=(ruby_value)
128
+ self.dtstart_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
129
+ end
130
+
131
+ # return the value of the DTSTART property
132
+ # which will be an instance of either DateTime or Date
133
+ def dtstart
134
+ dtstart_property ? dtstart_property.ruby_value : nil
135
+ end
136
+
137
+ def dtstart_property_from_string(line) # :nodoc:
138
+ @dtstart_property = RiCal::PropertyValue::DateTime.or_date(self, line)
139
+ end
140
+
141
+
142
+ # return the the DTSTAMP property
143
+ # which will be an instances of RiCal::PropertyValueDateTime
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::PropertyValueDateTime
155
+ def dtstamp_property=(property_value)
156
+ @dtstamp_property = property_value ? property_value.for_parent(self) : nil
157
+ end
158
+
159
+ # set the value of the DTSTAMP property
160
+ def dtstamp=(ruby_value)
161
+ self.dtstamp_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
162
+ end
163
+
164
+ # return the value of the DTSTAMP property
165
+ # which will be an instance of DateTime
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::DateTime.new(self, line)
172
+ end
173
+
174
+
175
+ # return the the LAST-MODIFIED property
176
+ # which will be an instances of RiCal::PropertyValueDateTime
177
+ #
178
+ # [purpose (from RFC 2445)]
179
+ # This property specifies the date and time that the information associated with the calendar component was last revised in teh calendar store.
180
+ #
181
+ # see RFC 2445 4.8.7.3 p 131
182
+ def last_modified_property
183
+ @last_modified_property
184
+ end
185
+
186
+ # set the LAST-MODIFIED property
187
+ # property value should be an instance of RiCal::PropertyValueDateTime
188
+ def last_modified_property=(property_value)
189
+ @last_modified_property = property_value ? property_value.for_parent(self) : nil
190
+ end
191
+
192
+ # set the value of the LAST-MODIFIED property
193
+ def last_modified=(ruby_value)
194
+ self.last_modified_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
195
+ end
196
+
197
+ # return the value of the LAST-MODIFIED property
198
+ # which will be an instance of DateTime
199
+ def last_modified
200
+ last_modified_property ? last_modified_property.ruby_value : nil
201
+ end
202
+
203
+ def last_modified_property_from_string(line) # :nodoc:
204
+ @last_modified_property = RiCal::PropertyValue::DateTime.new(self, line)
205
+ end
206
+
207
+
208
+ # return the the ORGANIZER property
209
+ # which will be an instances of RiCal::PropertyValueCalAddress
210
+ #
211
+ # [purpose (from RFC 2445)]
212
+ # The property defines the organizer for a calendar component.
213
+ #
214
+ # see RFC 2445 4.8.4.3 pp 106-107
215
+ def organizer_property
216
+ @organizer_property
217
+ end
218
+
219
+ # set the ORGANIZER property
220
+ # property value should be an instance of RiCal::PropertyValueCalAddress
221
+ def organizer_property=(property_value)
222
+ @organizer_property = property_value
223
+ end
224
+
225
+ # set the value of the ORGANIZER property
226
+ def organizer=(ruby_value)
227
+ self.organizer_property= RiCal::PropertyValue::CalAddress.convert(self, ruby_value)
228
+ end
229
+
230
+ # return the value of the ORGANIZER property
231
+ # which will be an instance of CalAddress
232
+ def organizer
233
+ organizer_property ? organizer_property.ruby_value : nil
234
+ end
235
+
236
+ def organizer_property_from_string(line) # :nodoc:
237
+ @organizer_property = RiCal::PropertyValue::CalAddress.new(self, line)
238
+ end
239
+
240
+
241
+ # return the the RECURRENCE-ID property
242
+ # which will be an instances of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
243
+ #
244
+ # [purpose (from RFC 2445)]
245
+ # 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.
246
+ #
247
+ # see RFC 2445 4.8.4.4 pp 107-109
248
+ def recurrence_id_property
249
+ @recurrence_id_property
250
+ end
251
+
252
+ # set the RECURRENCE-ID property
253
+ # property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
254
+ def recurrence_id_property=(property_value)
255
+ @recurrence_id_property = property_value ? property_value.for_parent(self) : nil
256
+ end
257
+
258
+ # set the value of the RECURRENCE-ID property
259
+ def recurrence_id=(ruby_value)
260
+ self.recurrence_id_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
261
+ end
262
+
263
+ # return the value of the RECURRENCE-ID property
264
+ # which will be an instance of either DateTime or Date
265
+ def recurrence_id
266
+ recurrence_id_property ? recurrence_id_property.ruby_value : nil
267
+ end
268
+
269
+ def recurrence_id_property_from_string(line) # :nodoc:
270
+ @recurrence_id_property = RiCal::PropertyValue::DateTime.or_date(self, line)
271
+ end
272
+
273
+
274
+ # return the the SEQUENCE property
275
+ # which will be an instances of RiCal::PropertyValueInteger
276
+ #
277
+ # [purpose (from RFC 2445)]
278
+ # This property defines the revision sequence number of the calendar component within a sequence of revisions.
279
+ #
280
+ # see RFC 2445 4.8.7.4 pp 131-133
281
+ def sequence_property
282
+ @sequence_property
283
+ end
284
+
285
+ # set the SEQUENCE property
286
+ # property value should be an instance of RiCal::PropertyValueInteger
287
+ def sequence_property=(property_value)
288
+ @sequence_property = property_value
289
+ end
290
+
291
+ # set the value of the SEQUENCE property
292
+ def sequence=(ruby_value)
293
+ self.sequence_property= RiCal::PropertyValue::Integer.convert(self, ruby_value)
294
+ end
295
+
296
+ # return the value of the SEQUENCE property
297
+ # which will be an instance of Integer
298
+ def sequence
299
+ sequence_property ? sequence_property.ruby_value : nil
300
+ end
301
+
302
+ def sequence_property_from_string(line) # :nodoc:
303
+ @sequence_property = RiCal::PropertyValue::Integer.new(self, line)
304
+ end
305
+
306
+
307
+ # return the the STATUS property
308
+ # which will be an instances of RiCal::PropertyValueText
309
+ #
310
+ # [purpose (from RFC 2445)]
311
+ # This property defines a short summary or subject for the calendar component.
312
+ #
313
+ # see RFC 2445 4.8.1.11 pp 80-89
314
+ def status_property
315
+ @status_property
316
+ end
317
+
318
+ # set the STATUS property
319
+ # property value should be an instance of RiCal::PropertyValueText
320
+ def status_property=(property_value)
321
+ @status_property = property_value
322
+ end
323
+
324
+ # set the value of the STATUS property
325
+ def status=(ruby_value)
326
+ self.status_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
327
+ end
328
+
329
+ # return the value of the STATUS property
330
+ # which will be an instance of String
331
+ def status
332
+ status_property ? status_property.ruby_value : nil
333
+ end
334
+
335
+ def status_property_from_string(line) # :nodoc:
336
+ @status_property = RiCal::PropertyValue::Text.new(self, line)
337
+ end
338
+
339
+
340
+ # return the the SUMMARY property
341
+ # which will be an instances of RiCal::PropertyValueText
342
+ #
343
+ # [purpose (from RFC 2445)]
344
+ # This property defines a short summary or subject for the calendar component.
345
+ #
346
+ # see RFC 2445 4.8.1.12 pp 89-90
347
+ def summary_property
348
+ @summary_property
349
+ end
350
+
351
+ # set the SUMMARY property
352
+ # property value should be an instance of RiCal::PropertyValueText
353
+ def summary_property=(property_value)
354
+ @summary_property = property_value
355
+ end
356
+
357
+ # set the value of the SUMMARY property
358
+ def summary=(ruby_value)
359
+ self.summary_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
360
+ end
361
+
362
+ # return the value of the SUMMARY property
363
+ # which will be an instance of String
364
+ def summary
365
+ summary_property ? summary_property.ruby_value : nil
366
+ end
367
+
368
+ def summary_property_from_string(line) # :nodoc:
369
+ @summary_property = RiCal::PropertyValue::Text.new(self, line)
370
+ end
371
+
372
+
373
+ # return the the UID property
374
+ # which will be an instances of RiCal::PropertyValueText
375
+ #
376
+ # [purpose (from RFC 2445)]
377
+ # This property defines the persistent, globally unique identifier for the calendar component.
378
+ #
379
+ # see RFC 2445 4.8.4.7 pp 111-112
380
+ def uid_property
381
+ @uid_property
382
+ end
383
+
384
+ # set the UID property
385
+ # property value should be an instance of RiCal::PropertyValueText
386
+ def uid_property=(property_value)
387
+ @uid_property = property_value
388
+ end
389
+
390
+ # set the value of the UID property
391
+ def uid=(ruby_value)
392
+ self.uid_property= RiCal::PropertyValue::Text.convert(self, ruby_value)
393
+ end
394
+
395
+ # return the value of the UID property
396
+ # which will be an instance of String
397
+ def uid
398
+ uid_property ? uid_property.ruby_value : nil
399
+ end
400
+
401
+ def uid_property_from_string(line) # :nodoc:
402
+ @uid_property = RiCal::PropertyValue::Text.new(self, line)
403
+ end
404
+
405
+
406
+ # return the the URL property
407
+ # which will be an instances of RiCal::PropertyValueUri
408
+ #
409
+ # [purpose (from RFC 2445)]
410
+ # This property defines a Uniform Resource Locator (URL) associated with the iCalendar object.
411
+ #
412
+ # see RFC 2445 4.8.4.6 pp 110-111
413
+ def url_property
414
+ @url_property
415
+ end
416
+
417
+ # set the URL property
418
+ # property value should be an instance of RiCal::PropertyValueUri
419
+ def url_property=(property_value)
420
+ @url_property = property_value
421
+ end
422
+
423
+ # set the value of the URL property
424
+ def url=(ruby_value)
425
+ self.url_property= RiCal::PropertyValue::Uri.convert(self, ruby_value)
426
+ end
427
+
428
+ # return the value of the URL property
429
+ # which will be an instance of Uri
430
+ def url
431
+ url_property ? url_property.ruby_value : nil
432
+ end
433
+
434
+ def url_property_from_string(line) # :nodoc:
435
+ @url_property = RiCal::PropertyValue::Uri.new(self, line)
436
+ end
437
+
438
+
439
+ # return the the ATTACH property
440
+ # which will be an array of instances of RiCal::PropertyValueUri
441
+ #
442
+ # [purpose (from RFC 2445)]
443
+ # The property provides the capability to associate a document object with a calendar component.
444
+ #
445
+ # see RFC 2445 4.8.1.1 pp 77-78
446
+ def attach_property
447
+ @attach_property ||= []
448
+ end
449
+
450
+ # set the the ATTACH property
451
+ # one or more instances of RiCal::PropertyValueUri may be passed to this method
452
+ def attach_property=(*property_values)
453
+ @attach_property= property_values
454
+ end
455
+
456
+ # set the value of the ATTACH property to multiple values
457
+ # one or more instances of Uri may be passed to this method
458
+ def attachments=(ruby_values)
459
+ @attach_property = ruby_values.map {|val| RiCal::PropertyValue::Uri.convert(self, val)}
460
+ end
461
+
462
+ # set the value of the ATTACH property to a single value
463
+ # one instance of Uri may be passed to this method
464
+ def attach=(ruby_value)
465
+ @attach_property = [RiCal::PropertyValue::Uri.convert(self, ruby_value)]
466
+ end
467
+
468
+ # add one or more values to the ATTACH property
469
+ # one or more instances of Uri may be passed to this method
470
+ def add_attachments(*ruby_values)
471
+ ruby_values.each {|val| self.attach_property << RiCal::PropertyValue::Uri.convert(self, val)}
472
+ end
473
+
474
+ # add one value to the ATTACH property
475
+ # one instances of Uri may be passed to this method
476
+ def add_attach(ruby_value)
477
+ self.attach_property << RiCal::PropertyValue::Uri.convert(self, ruby_value)
478
+ end
479
+
480
+ # remove one or more values from the ATTACH property
481
+ # one or more instances of Uri may be passed to this method
482
+ def remove_attachments(*ruby_values)
483
+ ruby_values.each {|val| self.attach_property.delete(RiCal::PropertyValue::Uri.convert(self, val))}
484
+ end
485
+
486
+ # remove one value from the ATTACH property
487
+ # one instances of Uri may be passed to this method
488
+ def remove_attach(ruby_value)
489
+ self.attach_property.delete(RiCal::PropertyValue::Uri.convert(self, ruby_value))
490
+ end
491
+
492
+ # return the value of the ATTACH property
493
+ # which will be an array of instances of Uri
494
+ def attach
495
+ attach_property.map {|prop| prop ? prop.ruby_value : prop}
496
+ end
497
+
498
+ def attach_property_from_string(line) # :nodoc:
499
+ attach_property << RiCal::PropertyValue::Uri.new(self, line)
500
+ end
501
+
502
+ # return the the ATTENDEE property
503
+ # which will be an array of instances of RiCal::PropertyValueCalAddress
504
+ #
505
+ # [purpose (from RFC 2445)]
506
+ # The property defines an 'Attendee' within a calendar component.
507
+ #
508
+ # see RFC 2445 4.8.4.1 pp 102-104
509
+ def attendee_property
510
+ @attendee_property ||= []
511
+ end
512
+
513
+ # set the the ATTENDEE property
514
+ # one or more instances of RiCal::PropertyValueCalAddress may be passed to this method
515
+ def attendee_property=(*property_values)
516
+ @attendee_property= property_values
517
+ end
518
+
519
+ # set the value of the ATTENDEE property to multiple values
520
+ # one or more instances of CalAddress may be passed to this method
521
+ def attendees=(ruby_values)
522
+ @attendee_property = ruby_values.map {|val| RiCal::PropertyValue::CalAddress.convert(self, val)}
523
+ end
524
+
525
+ # set the value of the ATTENDEE property to a single value
526
+ # one instance of CalAddress may be passed to this method
527
+ def attendee=(ruby_value)
528
+ @attendee_property = [RiCal::PropertyValue::CalAddress.convert(self, ruby_value)]
529
+ end
530
+
531
+ # add one or more values to the ATTENDEE property
532
+ # one or more instances of CalAddress may be passed to this method
533
+ def add_attendees(*ruby_values)
534
+ ruby_values.each {|val| self.attendee_property << RiCal::PropertyValue::CalAddress.convert(self, val)}
535
+ end
536
+
537
+ # add one value to the ATTENDEE property
538
+ # one instances of CalAddress may be passed to this method
539
+ def add_attendee(ruby_value)
540
+ self.attendee_property << RiCal::PropertyValue::CalAddress.convert(self, ruby_value)
541
+ end
542
+
543
+ # remove one or more values from the ATTENDEE property
544
+ # one or more instances of CalAddress may be passed to this method
545
+ def remove_attendees(*ruby_values)
546
+ ruby_values.each {|val| self.attendee_property.delete(RiCal::PropertyValue::CalAddress.convert(self, val))}
547
+ end
548
+
549
+ # remove one value from the ATTENDEE property
550
+ # one instances of CalAddress may be passed to this method
551
+ def remove_attendee(ruby_value)
552
+ self.attendee_property.delete(RiCal::PropertyValue::CalAddress.convert(self, ruby_value))
553
+ end
554
+
555
+ # return the value of the ATTENDEE property
556
+ # which will be an array of instances of CalAddress
557
+ def attendee
558
+ attendee_property.map {|prop| prop ? prop.ruby_value : prop}
559
+ end
560
+
561
+ def attendee_property_from_string(line) # :nodoc:
562
+ attendee_property << RiCal::PropertyValue::CalAddress.new(self, line)
563
+ end
564
+
565
+ # return the the CATEGORIES property
566
+ # which will be an array of instances of RiCal::PropertyValueArray
567
+ #
568
+ # [purpose (from RFC 2445)]
569
+ # This property defines the categories for a calendar component.
570
+ #
571
+ # see RFC 2445 4.8.1.2 pp 78-79
572
+ def categories_property
573
+ @categories_property ||= []
574
+ end
575
+
576
+ # set the the CATEGORIES property
577
+ # one or more instances of RiCal::PropertyValueArray may be passed to this method
578
+ def categories_property=(*property_values)
579
+ @categories_property= property_values
580
+ end
581
+
582
+ # set the value of the CATEGORIES property to multiple values
583
+ # one or more instances of Array may be passed to this method
584
+ def multiple_categories=(ruby_values)
585
+ @categories_property = ruby_values.map {|val| RiCal::PropertyValue::Array.convert(self, val)}
586
+ end
587
+
588
+ # set the value of the CATEGORIES property to a single value
589
+ # one instance of Array may be passed to this method
590
+ def categories=(ruby_value)
591
+ @categories_property = [RiCal::PropertyValue::Array.convert(self, ruby_value)]
592
+ end
593
+
594
+ # add one or more values to the CATEGORIES property
595
+ # one or more instances of Array may be passed to this method
596
+ def add_multiple_categories(*ruby_values)
597
+ ruby_values.each {|val| self.categories_property << RiCal::PropertyValue::Array.convert(self, val)}
598
+ end
599
+
600
+ # add one value to the CATEGORIES property
601
+ # one instances of Array may be passed to this method
602
+ def add_categories(ruby_value)
603
+ self.categories_property << RiCal::PropertyValue::Array.convert(self, ruby_value)
604
+ end
605
+
606
+ # remove one or more values from the CATEGORIES property
607
+ # one or more instances of Array may be passed to this method
608
+ def remove_multiple_categories(*ruby_values)
609
+ ruby_values.each {|val| self.categories_property.delete(RiCal::PropertyValue::Array.convert(self, val))}
610
+ end
611
+
612
+ # remove one value from the CATEGORIES property
613
+ # one instances of Array may be passed to this method
614
+ def remove_categories(ruby_value)
615
+ self.categories_property.delete(RiCal::PropertyValue::Array.convert(self, ruby_value))
616
+ end
617
+
618
+ # return the value of the CATEGORIES property
619
+ # which will be an array of instances of Array
620
+ def categories
621
+ categories_property.map {|prop| prop ? prop.ruby_value : prop}
622
+ end
623
+
624
+ def categories_property_from_string(line) # :nodoc:
625
+ categories_property << RiCal::PropertyValue::Array.new(self, line)
626
+ end
627
+
628
+ # return the the COMMENT property
629
+ # which will be an array of instances of RiCal::PropertyValueText
630
+ #
631
+ # [purpose (from RFC 2445)]
632
+ # This property specifies non-processing information intended to provide a comment to the calendar user.
633
+ #
634
+ # see RFC 2445 4.8.1.4 pp 80-81
635
+ def comment_property
636
+ @comment_property ||= []
637
+ end
638
+
639
+ # set the the COMMENT property
640
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
641
+ def comment_property=(*property_values)
642
+ @comment_property= property_values
643
+ end
644
+
645
+ # set the value of the COMMENT property to multiple values
646
+ # one or more instances of String may be passed to this method
647
+ def comments=(ruby_values)
648
+ @comment_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
649
+ end
650
+
651
+ # set the value of the COMMENT property to a single value
652
+ # one instance of String may be passed to this method
653
+ def comment=(ruby_value)
654
+ @comment_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
655
+ end
656
+
657
+ # add one or more values to the COMMENT property
658
+ # one or more instances of String may be passed to this method
659
+ def add_comments(*ruby_values)
660
+ ruby_values.each {|val| self.comment_property << RiCal::PropertyValue::Text.convert(self, val)}
661
+ end
662
+
663
+ # add one value to the COMMENT property
664
+ # one instances of String may be passed to this method
665
+ def add_comment(ruby_value)
666
+ self.comment_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
667
+ end
668
+
669
+ # remove one or more values from the COMMENT property
670
+ # one or more instances of String may be passed to this method
671
+ def remove_comments(*ruby_values)
672
+ ruby_values.each {|val| self.comment_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
673
+ end
674
+
675
+ # remove one value from the COMMENT property
676
+ # one instances of String may be passed to this method
677
+ def remove_comment(ruby_value)
678
+ self.comment_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
679
+ end
680
+
681
+ # return the value of the COMMENT property
682
+ # which will be an array of instances of String
683
+ def comment
684
+ comment_property.map {|prop| prop ? prop.ruby_value : prop}
685
+ end
686
+
687
+ def comment_property_from_string(line) # :nodoc:
688
+ comment_property << RiCal::PropertyValue::Text.new(self, line)
689
+ end
690
+
691
+ # return the the CONTACT property
692
+ # which will be an array of instances of RiCal::PropertyValueText
693
+ #
694
+ # [purpose (from RFC 2445)]
695
+ # The property is used to represent contact information oralternately a reference to contact information associated with the calendar component.
696
+ #
697
+ # see RFC 2445 4.8.4.2 pp 104-106
698
+ def contact_property
699
+ @contact_property ||= []
700
+ end
701
+
702
+ # set the the CONTACT property
703
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
704
+ def contact_property=(*property_values)
705
+ @contact_property= property_values
706
+ end
707
+
708
+ # set the value of the CONTACT property to multiple values
709
+ # one or more instances of String may be passed to this method
710
+ def contacts=(ruby_values)
711
+ @contact_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
712
+ end
713
+
714
+ # set the value of the CONTACT property to a single value
715
+ # one instance of String may be passed to this method
716
+ def contact=(ruby_value)
717
+ @contact_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
718
+ end
719
+
720
+ # add one or more values to the CONTACT property
721
+ # one or more instances of String may be passed to this method
722
+ def add_contacts(*ruby_values)
723
+ ruby_values.each {|val| self.contact_property << RiCal::PropertyValue::Text.convert(self, val)}
724
+ end
725
+
726
+ # add one value to the CONTACT property
727
+ # one instances of String may be passed to this method
728
+ def add_contact(ruby_value)
729
+ self.contact_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
730
+ end
731
+
732
+ # remove one or more values from the CONTACT property
733
+ # one or more instances of String may be passed to this method
734
+ def remove_contacts(*ruby_values)
735
+ ruby_values.each {|val| self.contact_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
736
+ end
737
+
738
+ # remove one value from the CONTACT property
739
+ # one instances of String may be passed to this method
740
+ def remove_contact(ruby_value)
741
+ self.contact_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
742
+ end
743
+
744
+ # return the value of the CONTACT property
745
+ # which will be an array of instances of String
746
+ def contact
747
+ contact_property.map {|prop| prop ? prop.ruby_value : prop}
748
+ end
749
+
750
+ def contact_property_from_string(line) # :nodoc:
751
+ contact_property << RiCal::PropertyValue::Text.new(self, line)
752
+ end
753
+
754
+ # return the the EXDATE property
755
+ # which will be an array of instances of RiCal::PropertyValueOccurrenceList
756
+ #
757
+ # [purpose (from RFC 2445)]
758
+ # This property defines the list of date/time exceptions for a recurring calendar component.
759
+ #
760
+ # see RFC 2445 4.8.5.1 pp 112-114
761
+ def exdate_property
762
+ @exdate_property ||= []
763
+ end
764
+
765
+ # set the the EXDATE property
766
+ # one or more instances of RiCal::PropertyValueOccurrenceList may be passed to this method
767
+ def exdate_property=(*property_values)
768
+ @exdate_property= property_values.map{|prop| prop.for_parent(self)}
769
+ end
770
+
771
+ # set the value of the EXDATE property to multiple values
772
+ # one or more instances of OccurrenceList may be passed to this method
773
+ def exdates=(ruby_values)
774
+ @exdate_property = ruby_values.map {|val| RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
775
+ end
776
+
777
+ # set the value of the EXDATE property to a single value
778
+ # one instance of OccurrenceList may be passed to this method
779
+ def exdate=(*ruby_value)
780
+ @exdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)]
781
+ end
782
+
783
+ # add one or more values to the EXDATE property
784
+ # one or more instances of OccurrenceList may be passed to this method
785
+ def add_exdates(*ruby_values)
786
+ ruby_values.each {|val| self.exdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
787
+ end
788
+
789
+ # add one value to the EXDATE property
790
+ # one instances of OccurrenceList may be passed to this method
791
+ def add_exdate(*ruby_value)
792
+ self.exdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)
793
+ end
794
+
795
+ # remove one or more values from the EXDATE property
796
+ # one or more instances of OccurrenceList may be passed to this method
797
+ def remove_exdates(*ruby_values)
798
+ ruby_values.each {|val| self.exdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *val))}
799
+ end
800
+
801
+ # remove one value from the EXDATE property
802
+ # one instances of OccurrenceList may be passed to this method
803
+ def remove_exdate(*ruby_value)
804
+ self.exdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value))
805
+ end
806
+
807
+ # return the value of the EXDATE property
808
+ # which will be an array of instances of OccurrenceList
809
+ def exdate
810
+ exdate_property.map {|prop| prop ? prop.ruby_value : prop}
811
+ end
812
+
813
+ def exdate_property_from_string(line) # :nodoc:
814
+ exdate_property << RiCal::PropertyValue::OccurrenceList.new(self, line)
815
+ end
816
+
817
+ # return the the EXRULE property
818
+ # which will be an array of instances of RiCal::PropertyValueRecurrenceRule
819
+ #
820
+ # [purpose (from RFC 2445)]
821
+ # This property defines a rule or repeating pattern for an exception to a recurrence set.
822
+ #
823
+ # see RFC 2445 4.8.5.2 pp 114-125
824
+ def exrule_property
825
+ @exrule_property ||= []
826
+ end
827
+
828
+ # set the the EXRULE property
829
+ # one or more instances of RiCal::PropertyValueRecurrenceRule may be passed to this method
830
+ def exrule_property=(*property_values)
831
+ @exrule_property= property_values
832
+ end
833
+
834
+ # set the value of the EXRULE property to multiple values
835
+ # one or more instances of RecurrenceRule may be passed to this method
836
+ def exrules=(ruby_values)
837
+ @exrule_property = ruby_values.map {|val| RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
838
+ end
839
+
840
+ # set the value of the EXRULE property to a single value
841
+ # one instance of RecurrenceRule may be passed to this method
842
+ def exrule=(ruby_value)
843
+ @exrule_property = [RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)]
844
+ end
845
+
846
+ # add one or more values to the EXRULE property
847
+ # one or more instances of RecurrenceRule may be passed to this method
848
+ def add_exrules(*ruby_values)
849
+ ruby_values.each {|val| self.exrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
850
+ end
851
+
852
+ # add one value to the EXRULE property
853
+ # one instances of RecurrenceRule may be passed to this method
854
+ def add_exrule(ruby_value)
855
+ self.exrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)
856
+ end
857
+
858
+ # remove one or more values from the EXRULE property
859
+ # one or more instances of RecurrenceRule may be passed to this method
860
+ def remove_exrules(*ruby_values)
861
+ ruby_values.each {|val| self.exrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, val))}
862
+ end
863
+
864
+ # remove one value from the EXRULE property
865
+ # one instances of RecurrenceRule may be passed to this method
866
+ def remove_exrule(ruby_value)
867
+ self.exrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value))
868
+ end
869
+
870
+ # return the value of the EXRULE property
871
+ # which will be an array of instances of RecurrenceRule
872
+ def exrule
873
+ exrule_property.map {|prop| prop ? prop.ruby_value : prop}
874
+ end
875
+
876
+ def exrule_property_from_string(line) # :nodoc:
877
+ exrule_property << RiCal::PropertyValue::RecurrenceRule.new(self, line)
878
+ end
879
+
880
+ # return the the RELATED-TO property
881
+ # which will be an array of instances of RiCal::PropertyValueText
882
+ #
883
+ # [purpose (from RFC 2445)]
884
+ # The property is used to represent a relationship or reference between one calendar component and another.
885
+ #
886
+ # see RFC 2445 4.8.4.5 pp 109-110
887
+ def related_to_property
888
+ @related_to_property ||= []
889
+ end
890
+
891
+ # set the the RELATED-TO property
892
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
893
+ def related_to_property=(*property_values)
894
+ @related_to_property= property_values
895
+ end
896
+
897
+ # set the value of the RELATED-TO property to multiple values
898
+ # one or more instances of String may be passed to this method
899
+ def multiple_related_to=(ruby_values)
900
+ @related_to_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
901
+ end
902
+
903
+ # set the value of the RELATED-TO property to a single value
904
+ # one instance of String may be passed to this method
905
+ def related_to=(ruby_value)
906
+ @related_to_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
907
+ end
908
+
909
+ # add one or more values to the RELATED-TO property
910
+ # one or more instances of String may be passed to this method
911
+ def add_multiple_related_to(*ruby_values)
912
+ ruby_values.each {|val| self.related_to_property << RiCal::PropertyValue::Text.convert(self, val)}
913
+ end
914
+
915
+ # add one value to the RELATED-TO property
916
+ # one instances of String may be passed to this method
917
+ def add_related_to(ruby_value)
918
+ self.related_to_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
919
+ end
920
+
921
+ # remove one or more values from the RELATED-TO property
922
+ # one or more instances of String may be passed to this method
923
+ def remove_multiple_related_to(*ruby_values)
924
+ ruby_values.each {|val| self.related_to_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
925
+ end
926
+
927
+ # remove one value from the RELATED-TO property
928
+ # one instances of String may be passed to this method
929
+ def remove_related_to(ruby_value)
930
+ self.related_to_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
931
+ end
932
+
933
+ # return the value of the RELATED-TO property
934
+ # which will be an array of instances of String
935
+ def related_to
936
+ related_to_property.map {|prop| prop ? prop.ruby_value : prop}
937
+ end
938
+
939
+ def related_to_property_from_string(line) # :nodoc:
940
+ related_to_property << RiCal::PropertyValue::Text.new(self, line)
941
+ end
942
+
943
+ # return the the RDATE property
944
+ # which will be an array of instances of RiCal::PropertyValueOccurrenceList
945
+ #
946
+ # [purpose (from RFC 2445)]
947
+ # This property defines the list of date/times for a recurring calendar component.
948
+ #
949
+ # see RFC 2445 4.8.5.3 pp 115-117
950
+ def rdate_property
951
+ @rdate_property ||= []
952
+ end
953
+
954
+ # set the the RDATE property
955
+ # one or more instances of RiCal::PropertyValueOccurrenceList may be passed to this method
956
+ def rdate_property=(*property_values)
957
+ @rdate_property= property_values.map{|prop| prop.for_parent(self)}
958
+ end
959
+
960
+ # set the value of the RDATE property to multiple values
961
+ # one or more instances of OccurrenceList may be passed to this method
962
+ def rdates=(ruby_values)
963
+ @rdate_property = ruby_values.map {|val| RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
964
+ end
965
+
966
+ # set the value of the RDATE property to a single value
967
+ # one instance of OccurrenceList may be passed to this method
968
+ def rdate=(*ruby_value)
969
+ @rdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)]
970
+ end
971
+
972
+ # add one or more values to the RDATE property
973
+ # one or more instances of OccurrenceList may be passed to this method
974
+ def add_rdates(*ruby_values)
975
+ ruby_values.each {|val| self.rdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
976
+ end
977
+
978
+ # add one value to the RDATE property
979
+ # one instances of OccurrenceList may be passed to this method
980
+ def add_rdate(*ruby_value)
981
+ self.rdate_property << RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)
982
+ end
983
+
984
+ # remove one or more values from the RDATE property
985
+ # one or more instances of OccurrenceList may be passed to this method
986
+ def remove_rdates(*ruby_values)
987
+ ruby_values.each {|val| self.rdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *val))}
988
+ end
989
+
990
+ # remove one value from the RDATE property
991
+ # one instances of OccurrenceList may be passed to this method
992
+ def remove_rdate(*ruby_value)
993
+ self.rdate_property.delete(RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value))
994
+ end
995
+
996
+ # return the value of the RDATE property
997
+ # which will be an array of instances of OccurrenceList
998
+ def rdate
999
+ rdate_property.map {|prop| prop ? prop.ruby_value : prop}
1000
+ end
1001
+
1002
+ def rdate_property_from_string(line) # :nodoc:
1003
+ rdate_property << RiCal::PropertyValue::OccurrenceList.new(self, line)
1004
+ end
1005
+
1006
+ # return the the RRULE property
1007
+ # which will be an array of instances of RiCal::PropertyValueRecurrenceRule
1008
+ #
1009
+ # [purpose (from RFC 2445)]
1010
+ # This property defines a rule or repeating pattern for recurring events, to-dos, or time zone definitions.
1011
+ #
1012
+ # see RFC 2445 4.8.5.4 pp 117-125
1013
+ def rrule_property
1014
+ @rrule_property ||= []
1015
+ end
1016
+
1017
+ # set the the RRULE property
1018
+ # one or more instances of RiCal::PropertyValueRecurrenceRule may be passed to this method
1019
+ def rrule_property=(*property_values)
1020
+ @rrule_property= property_values
1021
+ end
1022
+
1023
+ # set the value of the RRULE property to multiple values
1024
+ # one or more instances of RecurrenceRule may be passed to this method
1025
+ def rrules=(ruby_values)
1026
+ @rrule_property = ruby_values.map {|val| RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1027
+ end
1028
+
1029
+ # set the value of the RRULE property to a single value
1030
+ # one instance of RecurrenceRule may be passed to this method
1031
+ def rrule=(ruby_value)
1032
+ @rrule_property = [RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)]
1033
+ end
1034
+
1035
+ # add one or more values to the RRULE property
1036
+ # one or more instances of RecurrenceRule may be passed to this method
1037
+ def add_rrules(*ruby_values)
1038
+ ruby_values.each {|val| self.rrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, val)}
1039
+ end
1040
+
1041
+ # add one value to the RRULE property
1042
+ # one instances of RecurrenceRule may be passed to this method
1043
+ def add_rrule(ruby_value)
1044
+ self.rrule_property << RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value)
1045
+ end
1046
+
1047
+ # remove one or more values from the RRULE property
1048
+ # one or more instances of RecurrenceRule may be passed to this method
1049
+ def remove_rrules(*ruby_values)
1050
+ ruby_values.each {|val| self.rrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, val))}
1051
+ end
1052
+
1053
+ # remove one value from the RRULE property
1054
+ # one instances of RecurrenceRule may be passed to this method
1055
+ def remove_rrule(ruby_value)
1056
+ self.rrule_property.delete(RiCal::PropertyValue::RecurrenceRule.convert(self, ruby_value))
1057
+ end
1058
+
1059
+ # return the value of the RRULE property
1060
+ # which will be an array of instances of RecurrenceRule
1061
+ def rrule
1062
+ rrule_property.map {|prop| prop ? prop.ruby_value : prop}
1063
+ end
1064
+
1065
+ def rrule_property_from_string(line) # :nodoc:
1066
+ rrule_property << RiCal::PropertyValue::RecurrenceRule.new(self, line)
1067
+ end
1068
+
1069
+ # return the the REQUEST-STATUS property
1070
+ # which will be an array of instances of RiCal::PropertyValueText
1071
+ #
1072
+ # see RFC 2445 4.8.8.2 pp 134-136
1073
+ def request_status_property
1074
+ @request_status_property ||= []
1075
+ end
1076
+
1077
+ # set the the REQUEST-STATUS property
1078
+ # one or more instances of RiCal::PropertyValueText may be passed to this method
1079
+ def request_status_property=(*property_values)
1080
+ @request_status_property= property_values
1081
+ end
1082
+
1083
+ # set the value of the REQUEST-STATUS property to multiple values
1084
+ # one or more instances of String may be passed to this method
1085
+ def request_statuses=(ruby_values)
1086
+ @request_status_property = ruby_values.map {|val| RiCal::PropertyValue::Text.convert(self, val)}
1087
+ end
1088
+
1089
+ # set the value of the REQUEST-STATUS property to a single value
1090
+ # one instance of String may be passed to this method
1091
+ def request_status=(ruby_value)
1092
+ @request_status_property = [RiCal::PropertyValue::Text.convert(self, ruby_value)]
1093
+ end
1094
+
1095
+ # add one or more values to the REQUEST-STATUS property
1096
+ # one or more instances of String may be passed to this method
1097
+ def add_request_statuses(*ruby_values)
1098
+ ruby_values.each {|val| self.request_status_property << RiCal::PropertyValue::Text.convert(self, val)}
1099
+ end
1100
+
1101
+ # add one value to the REQUEST-STATUS property
1102
+ # one instances of String may be passed to this method
1103
+ def add_request_status(ruby_value)
1104
+ self.request_status_property << RiCal::PropertyValue::Text.convert(self, ruby_value)
1105
+ end
1106
+
1107
+ # remove one or more values from the REQUEST-STATUS property
1108
+ # one or more instances of String may be passed to this method
1109
+ def remove_request_statuses(*ruby_values)
1110
+ ruby_values.each {|val| self.request_status_property.delete(RiCal::PropertyValue::Text.convert(self, val))}
1111
+ end
1112
+
1113
+ # remove one value from the REQUEST-STATUS property
1114
+ # one instances of String may be passed to this method
1115
+ def remove_request_status(ruby_value)
1116
+ self.request_status_property.delete(RiCal::PropertyValue::Text.convert(self, ruby_value))
1117
+ end
1118
+
1119
+ # return the value of the REQUEST-STATUS property
1120
+ # which will be an array of instances of String
1121
+ def request_status
1122
+ request_status_property.map {|prop| prop ? prop.ruby_value : prop}
1123
+ end
1124
+
1125
+ def request_status_property_from_string(line) # :nodoc:
1126
+ request_status_property << RiCal::PropertyValue::Text.new(self, line)
1127
+ end
1128
+
1129
+ def export_properties_to(export_stream) #:nodoc:
1130
+ export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
1131
+ export_prop_to(export_stream, "EXDATE", @exdate_property)
1132
+ export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
1133
+ export_prop_to(export_stream, "CREATED", @created_property)
1134
+ export_prop_to(export_stream, "CONTACT", @contact_property)
1135
+ export_prop_to(export_stream, "CATEGORIES", @categories_property)
1136
+ export_prop_to(export_stream, "STATUS", @status_property)
1137
+ export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
1138
+ export_prop_to(export_stream, "DTSTART", @dtstart_property)
1139
+ export_prop_to(export_stream, "RECURRENCE-ID", @recurrence_id_property)
1140
+ export_prop_to(export_stream, "ATTENDEE", @attendee_property)
1141
+ export_prop_to(export_stream, "UID", @uid_property)
1142
+ export_prop_to(export_stream, "URL", @url_property)
1143
+ export_prop_to(export_stream, "ORGANIZER", @organizer_property)
1144
+ export_prop_to(export_stream, "RRULE", @rrule_property)
1145
+ export_prop_to(export_stream, "DESCRIPTION", @description_property)
1146
+ export_prop_to(export_stream, "CLASS", @class_property)
1147
+ export_prop_to(export_stream, "SUMMARY", @summary_property)
1148
+ export_prop_to(export_stream, "ATTACH", @attach_property)
1149
+ export_prop_to(export_stream, "SEQUENCE", @sequence_property)
1150
+ export_prop_to(export_stream, "RDATE", @rdate_property)
1151
+ export_prop_to(export_stream, "RELATED-TO", @related_to_property)
1152
+ export_prop_to(export_stream, "EXRULE", @exrule_property)
1153
+ export_prop_to(export_stream, "COMMENT", @comment_property)
1154
+ end
1155
+
1156
+ def ==(o) #:nodoc:
1157
+ if o.class == self.class
1158
+ (request_status_property == o.request_status_property) &&
1159
+ (exdate_property == o.exdate_property) &&
1160
+ (dtstamp_property == o.dtstamp_property) &&
1161
+ (created_property == o.created_property) &&
1162
+ (contact_property == o.contact_property) &&
1163
+ (categories_property == o.categories_property) &&
1164
+ (status_property == o.status_property) &&
1165
+ (last_modified_property == o.last_modified_property) &&
1166
+ (dtstart_property == o.dtstart_property) &&
1167
+ (recurrence_id_property == o.recurrence_id_property) &&
1168
+ (attendee_property == o.attendee_property) &&
1169
+ (uid_property == o.uid_property) &&
1170
+ (url_property == o.url_property) &&
1171
+ (organizer_property == o.organizer_property) &&
1172
+ (rrule_property == o.rrule_property) &&
1173
+ (description_property == o.description_property) &&
1174
+ (class_property == o.class_property) &&
1175
+ (summary_property == o.summary_property) &&
1176
+ (attach_property == o.attach_property) &&
1177
+ (sequence_property == o.sequence_property) &&
1178
+ (rdate_property == o.rdate_property) &&
1179
+ (related_to_property == o.related_to_property) &&
1180
+ (exrule_property == o.exrule_property) &&
1181
+ (comment_property == o.comment_property)
1182
+ else
1183
+ super
1184
+ end
1185
+ end
1186
+
1187
+ def initialize_copy(o) #:nodoc:
1188
+ super
1189
+ request_status_property = request_status_property && request_status_property.dup
1190
+ exdate_property = exdate_property && exdate_property.dup
1191
+ dtstamp_property = dtstamp_property && dtstamp_property.dup
1192
+ created_property = created_property && created_property.dup
1193
+ contact_property = contact_property && contact_property.dup
1194
+ categories_property = categories_property && categories_property.dup
1195
+ status_property = status_property && status_property.dup
1196
+ last_modified_property = last_modified_property && last_modified_property.dup
1197
+ dtstart_property = dtstart_property && dtstart_property.dup
1198
+ recurrence_id_property = recurrence_id_property && recurrence_id_property.dup
1199
+ attendee_property = attendee_property && attendee_property.dup
1200
+ uid_property = uid_property && uid_property.dup
1201
+ url_property = url_property && url_property.dup
1202
+ organizer_property = organizer_property && organizer_property.dup
1203
+ rrule_property = rrule_property && rrule_property.dup
1204
+ description_property = description_property && description_property.dup
1205
+ class_property = class_property && class_property.dup
1206
+ summary_property = summary_property && summary_property.dup
1207
+ attach_property = attach_property && attach_property.dup
1208
+ sequence_property = sequence_property && sequence_property.dup
1209
+ rdate_property = rdate_property && rdate_property.dup
1210
+ related_to_property = related_to_property && related_to_property.dup
1211
+ exrule_property = exrule_property && exrule_property.dup
1212
+ comment_property = comment_property && comment_property.dup
1213
+ end
1214
+
1215
+ def add_date_times_to(required_timezones) #:nodoc:
1216
+ add_property_date_times_to(required_timezones, created_property)
1217
+ add_property_date_times_to(required_timezones, dtstart_property)
1218
+ add_property_date_times_to(required_timezones, dtstamp_property)
1219
+ add_property_date_times_to(required_timezones, last_modified_property)
1220
+ add_property_date_times_to(required_timezones, recurrence_id_property)
1221
+ add_property_date_times_to(required_timezones, exdate_property)
1222
+ add_property_date_times_to(required_timezones, rdate_property)
1223
+ end
1224
+
1225
+ module ClassMethods #:nodoc:
1226
+ def property_parser #:nodoc:
1227
+ {"RDATE"=>:rdate_property_from_string, "RELATED-TO"=>:related_to_property_from_string, "DTSTART"=>:dtstart_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string, "EXRULE"=>:exrule_property_from_string, "CONTACT"=>:contact_property_from_string, "URL"=>:url_property_from_string, "LAST-MODIFIED"=>:last_modified_property_from_string, "EXDATE"=>:exdate_property_from_string, "ATTACH"=>:attach_property_from_string, "UID"=>:uid_property_from_string, "SEQUENCE"=>:sequence_property_from_string, "CATEGORIES"=>:categories_property_from_string, "SUMMARY"=>:summary_property_from_string, "RECURRENCE-ID"=>:recurrence_id_property_from_string, "CLASS"=>:class_property_from_string, "RRULE"=>:rrule_property_from_string, "STATUS"=>:status_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "ORGANIZER"=>:organizer_property_from_string, "CREATED"=>:created_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "COMMENT"=>:comment_property_from_string, "DESCRIPTION"=>:description_property_from_string}
1228
+ end
1229
+ end
1230
+
1231
+ def self.included(mod) #:nodoc:
1232
+ mod.extend ClassMethods
1233
+ end
1234
+
1235
+ def mutual_exclusion_violation #:nodoc:
1236
+ false
1237
+ end
1238
+ end
1239
+ end
1240
+ end