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