icalendar 0.96.3 → 0.96.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'rake/testtask'
4
4
  require 'rake/rdoctask'
5
5
 
6
- PKG_VERSION = "0.96.3"
6
+ PKG_VERSION = "0.96.4"
7
7
 
8
8
  $VERBOSE = nil
9
9
  TEST_CHANGES_SINCE = Time.now - 600 # Recent tests = changed in last 10 minutes
@@ -86,9 +86,9 @@ A module which adds some generators for hash based accessors.
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000053">hash_accessor</a>&nbsp;&nbsp;
90
- <a href="#M000051">hash_reader</a>&nbsp;&nbsp;
91
- <a href="#M000052">hash_writer</a>&nbsp;&nbsp;
89
+ <a href="#M000054">hash_accessor</a>&nbsp;&nbsp;
90
+ <a href="#M000052">hash_reader</a>&nbsp;&nbsp;
91
+ <a href="#M000053">hash_writer</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -110,19 +110,19 @@ A module which adds some generators for hash based accessors.
110
110
  <div id="methods">
111
111
  <h3 class="section-bar">Public Instance methods</h3>
112
112
 
113
- <div id="method-M000053" class="method-detail">
114
- <a name="M000053"></a>
113
+ <div id="method-M000054" class="method-detail">
114
+ <a name="M000054"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="#M000053" class="method-signature">
117
+ <a href="#M000054" class="method-signature">
118
118
  <span class="method-name">hash_accessor</span><span class="method-args">(hash, *syms)</span>
119
119
  </a>
120
120
  </div>
121
121
 
122
122
  <div class="method-description">
123
123
  <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000053-source">
124
+ onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000054-source">
126
126
  <pre>
127
127
  <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 29</span>
128
128
  29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_accessor</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
@@ -134,19 +134,19 @@ A module which adds some generators for hash based accessors.
134
134
  </div>
135
135
  </div>
136
136
 
137
- <div id="method-M000051" class="method-detail">
138
- <a name="M000051"></a>
137
+ <div id="method-M000052" class="method-detail">
138
+ <a name="M000052"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="#M000051" class="method-signature">
141
+ <a href="#M000052" class="method-signature">
142
142
  <span class="method-name">hash_reader</span><span class="method-args">(hash_sym, syms)</span>
143
143
  </a>
144
144
  </div>
145
145
 
146
146
  <div class="method-description">
147
147
  <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000051-source">
148
+ onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000052-source">
150
150
  <pre>
151
151
  <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 4</span>
152
152
  4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
@@ -165,19 +165,19 @@ A module which adds some generators for hash based accessors.
165
165
  </div>
166
166
  </div>
167
167
 
168
- <div id="method-M000052" class="method-detail">
169
- <a name="M000052"></a>
168
+ <div id="method-M000053" class="method-detail">
169
+ <a name="M000053"></a>
170
170
 
171
171
  <div class="method-heading">
172
- <a href="#M000052" class="method-signature">
172
+ <a href="#M000053" class="method-signature">
173
173
  <span class="method-name">hash_writer</span><span class="method-args">(hash_sym, syms)</span>
174
174
  </a>
175
175
  </div>
176
176
 
177
177
  <div class="method-description">
178
178
  <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000052-source">
179
+ onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
180
+ <div class="method-source-code" id="M000053-source">
181
181
  <pre>
182
182
  <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 16</span>
183
183
  16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_writer</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
@@ -128,22 +128,53 @@ Single properties
128
128
  <tr class="top-aligned-row context-row">
129
129
  <td class="context-item-name">attach</td>
130
130
  <td class="context-item-value">&nbsp;&nbsp;</td>
131
+ <td class="context-item-desc"></td>
132
+ </tr>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">attachment</td>
135
+ <td class="context-item-value">&nbsp;&nbsp;</td>
136
+ <td class="context-item-desc"></td>
137
+ </tr>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">attachments</td>
140
+ <td class="context-item-value">&nbsp;&nbsp;</td>
141
+ <td class="context-item-desc"></td>
142
+ </tr>
143
+ <tr class="top-aligned-row context-row">
144
+ <td class="context-item-name">attendee</td>
145
+ <td class="context-item-value">&nbsp;&nbsp;</td>
131
146
  <td class="context-item-desc">
132
- Single and only occurring once
147
+ Multi properties
133
148
 
134
149
  </td>
135
150
  </tr>
136
151
  <tr class="top-aligned-row context-row">
137
- <td class="context-item-name">attachment</td>
152
+ <td class="context-item-name">attendee</td>
138
153
  <td class="context-item-value">&nbsp;&nbsp;</td>
139
154
  <td class="context-item-desc">
140
- Single and only occurring once
155
+ Multi properties
156
+
157
+ </td>
158
+ </tr>
159
+ <tr class="top-aligned-row context-row">
160
+ <td class="context-item-name">attendees</td>
161
+ <td class="context-item-value">&nbsp;&nbsp;</td>
162
+ <td class="context-item-desc">
163
+ Multi properties
141
164
 
142
165
  </td>
143
166
  </tr>
144
167
  <tr class="top-aligned-row context-row">
145
168
  <td class="context-item-name">created</td>
146
169
  <td class="context-item-value">&nbsp;&nbsp;</td>
170
+ <td class="context-item-desc">
171
+ Single and only occurring once
172
+
173
+ </td>
174
+ </tr>
175
+ <tr class="top-aligned-row context-row">
176
+ <td class="context-item-name">description</td>
177
+ <td class="context-item-value">&nbsp;&nbsp;</td>
147
178
  <td class="context-item-desc"></td>
148
179
  </tr>
149
180
  <tr class="top-aligned-row context-row">
@@ -169,6 +200,11 @@ Single but must appear together
169
200
  <td class="context-item-value">&nbsp;&nbsp;</td>
170
201
  <td class="context-item-desc"></td>
171
202
  </tr>
203
+ <tr class="top-aligned-row context-row">
204
+ <td class="context-item-name">summary</td>
205
+ <td class="context-item-value">&nbsp;&nbsp;</td>
206
+ <td class="context-item-desc"></td>
207
+ </tr>
172
208
  <tr class="top-aligned-row context-row">
173
209
  <td class="context-item-name">timestamp</td>
174
210
  <td class="context-item-value">&nbsp;&nbsp;</td>
@@ -203,11 +239,11 @@ Single but must appear together
203
239
  onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
204
240
  <div class="method-source-code" id="M000021-source">
205
241
  <pre>
206
- <span class="ruby-comment cmt"># File lib/icalendar/component/alarm.rb, line 31</span>
207
- 31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
208
- 32: <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">&quot;VALARM&quot;</span>)
209
- 33:
210
- 34: <span class="ruby-keyword kw">end</span>
242
+ <span class="ruby-comment cmt"># File lib/icalendar/component/alarm.rb, line 36</span>
243
+ 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
244
+ 37: <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">&quot;VALARM&quot;</span>)
245
+ 38:
246
+ 39: <span class="ruby-keyword kw">end</span>
211
247
  </pre>
212
248
  </div>
213
249
  </div>
@@ -88,12 +88,12 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000043">event</a>&nbsp;&nbsp;
92
- <a href="#M000046">freebusy</a>&nbsp;&nbsp;
93
- <a href="#M000045">journal</a>&nbsp;&nbsp;
94
- <a href="#M000042">new</a>&nbsp;&nbsp;
95
- <a href="#M000047">timezone</a>&nbsp;&nbsp;
96
- <a href="#M000044">todo</a>&nbsp;&nbsp;
91
+ <a href="#M000044">event</a>&nbsp;&nbsp;
92
+ <a href="#M000047">freebusy</a>&nbsp;&nbsp;
93
+ <a href="#M000046">journal</a>&nbsp;&nbsp;
94
+ <a href="#M000043">new</a>&nbsp;&nbsp;
95
+ <a href="#M000048">timezone</a>&nbsp;&nbsp;
96
+ <a href="#M000045">todo</a>&nbsp;&nbsp;
97
97
  </div>
98
98
  </div>
99
99
 
@@ -178,19 +178,19 @@
178
178
  <div id="methods">
179
179
  <h3 class="section-bar">Public Class methods</h3>
180
180
 
181
- <div id="method-M000042" class="method-detail">
182
- <a name="M000042"></a>
181
+ <div id="method-M000043" class="method-detail">
182
+ <a name="M000043"></a>
183
183
 
184
184
  <div class="method-heading">
185
- <a href="#M000042" class="method-signature">
185
+ <a href="#M000043" class="method-signature">
186
186
  <span class="method-name">new</span><span class="method-args">()</span>
187
187
  </a>
188
188
  </div>
189
189
 
190
190
  <div class="method-description">
191
191
  <p><a class="source-toggle" href="#"
192
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
193
- <div class="method-source-code" id="M000042-source">
192
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
193
+ <div class="method-source-code" id="M000043-source">
194
194
  <pre>
195
195
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 19</span>
196
196
  19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
@@ -210,19 +210,19 @@
210
210
 
211
211
  <h3 class="section-bar">Public Instance methods</h3>
212
212
 
213
- <div id="method-M000043" class="method-detail">
214
- <a name="M000043"></a>
213
+ <div id="method-M000044" class="method-detail">
214
+ <a name="M000044"></a>
215
215
 
216
216
  <div class="method-heading">
217
- <a href="#M000043" class="method-signature">
217
+ <a href="#M000044" class="method-signature">
218
218
  <span class="method-name">event</span><span class="method-args">(&amp;block)</span>
219
219
  </a>
220
220
  </div>
221
221
 
222
222
  <div class="method-description">
223
223
  <p><a class="source-toggle" href="#"
224
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
225
- <div class="method-source-code" id="M000043-source">
224
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
225
+ <div class="method-source-code" id="M000044-source">
226
226
  <pre>
227
227
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 30</span>
228
228
  30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">event</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -238,19 +238,19 @@
238
238
  </div>
239
239
  </div>
240
240
 
241
- <div id="method-M000046" class="method-detail">
242
- <a name="M000046"></a>
241
+ <div id="method-M000047" class="method-detail">
242
+ <a name="M000047"></a>
243
243
 
244
244
  <div class="method-heading">
245
- <a href="#M000046" class="method-signature">
245
+ <a href="#M000047" class="method-signature">
246
246
  <span class="method-name">freebusy</span><span class="method-args">(&amp;block)</span>
247
247
  </a>
248
248
  </div>
249
249
 
250
250
  <div class="method-description">
251
251
  <p><a class="source-toggle" href="#"
252
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
253
- <div class="method-source-code" id="M000046-source">
252
+ onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
253
+ <div class="method-source-code" id="M000047-source">
254
254
  <pre>
255
255
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 57</span>
256
256
  57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freebusy</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -266,19 +266,19 @@
266
266
  </div>
267
267
  </div>
268
268
 
269
- <div id="method-M000045" class="method-detail">
270
- <a name="M000045"></a>
269
+ <div id="method-M000046" class="method-detail">
270
+ <a name="M000046"></a>
271
271
 
272
272
  <div class="method-heading">
273
- <a href="#M000045" class="method-signature">
273
+ <a href="#M000046" class="method-signature">
274
274
  <span class="method-name">journal</span><span class="method-args">(&amp;block)</span>
275
275
  </a>
276
276
  </div>
277
277
 
278
278
  <div class="method-description">
279
279
  <p><a class="source-toggle" href="#"
280
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
281
- <div class="method-source-code" id="M000045-source">
280
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
281
+ <div class="method-source-code" id="M000046-source">
282
282
  <pre>
283
283
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 48</span>
284
284
  48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">journal</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -294,19 +294,19 @@
294
294
  </div>
295
295
  </div>
296
296
 
297
- <div id="method-M000047" class="method-detail">
298
- <a name="M000047"></a>
297
+ <div id="method-M000048" class="method-detail">
298
+ <a name="M000048"></a>
299
299
 
300
300
  <div class="method-heading">
301
- <a href="#M000047" class="method-signature">
301
+ <a href="#M000048" class="method-signature">
302
302
  <span class="method-name">timezone</span><span class="method-args">(&amp;block)</span>
303
303
  </a>
304
304
  </div>
305
305
 
306
306
  <div class="method-description">
307
307
  <p><a class="source-toggle" href="#"
308
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
309
- <div class="method-source-code" id="M000047-source">
308
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
309
+ <div class="method-source-code" id="M000048-source">
310
310
  <pre>
311
311
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 66</span>
312
312
  66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timezone</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -322,19 +322,19 @@
322
322
  </div>
323
323
  </div>
324
324
 
325
- <div id="method-M000044" class="method-detail">
326
- <a name="M000044"></a>
325
+ <div id="method-M000045" class="method-detail">
326
+ <a name="M000045"></a>
327
327
 
328
328
  <div class="method-heading">
329
- <a href="#M000044" class="method-signature">
329
+ <a href="#M000045" class="method-signature">
330
330
  <span class="method-name">todo</span><span class="method-args">(&amp;block)</span>
331
331
  </a>
332
332
  </div>
333
333
 
334
334
  <div class="method-description">
335
335
  <p><a class="source-toggle" href="#"
336
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
337
- <div class="method-source-code" id="M000044-source">
336
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
337
+ <div class="method-source-code" id="M000045-source">
338
338
  <pre>
339
339
  <span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 39</span>
340
340
  39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">todo</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -102,20 +102,20 @@ an <a href="Alarm.html">Alarm</a>.
102
102
  <h3 class="section-bar">Methods</h3>
103
103
 
104
104
  <div class="name-list">
105
- <a href="#M000027">add</a>&nbsp;&nbsp;
106
- <a href="#M000026">add_component</a>&nbsp;&nbsp;
107
- <a href="#M000032">custom_property</a>&nbsp;&nbsp;
108
- <a href="#M000034">ical_component</a>&nbsp;&nbsp;
109
- <a href="#M000036">ical_multi_property</a>&nbsp;&nbsp;
110
- <a href="#M000035">ical_property</a>&nbsp;&nbsp;
111
- <a href="#M000037">method_missing</a>&nbsp;&nbsp;
112
- <a href="#M000033">multi_property?</a>&nbsp;&nbsp;
113
- <a href="#M000025">new</a>&nbsp;&nbsp;
114
- <a href="#M000029">print_component</a>&nbsp;&nbsp;
115
- <a href="#M000031">print_parameter</a>&nbsp;&nbsp;
116
- <a href="#M000030">print_properties</a>&nbsp;&nbsp;
117
- <a href="#M000038">respond_to?</a>&nbsp;&nbsp;
118
- <a href="#M000028">to_ical</a>&nbsp;&nbsp;
105
+ <a href="#M000028">add</a>&nbsp;&nbsp;
106
+ <a href="#M000027">add_component</a>&nbsp;&nbsp;
107
+ <a href="#M000033">custom_property</a>&nbsp;&nbsp;
108
+ <a href="#M000035">ical_component</a>&nbsp;&nbsp;
109
+ <a href="#M000037">ical_multi_property</a>&nbsp;&nbsp;
110
+ <a href="#M000036">ical_property</a>&nbsp;&nbsp;
111
+ <a href="#M000038">method_missing</a>&nbsp;&nbsp;
112
+ <a href="#M000034">multi_property?</a>&nbsp;&nbsp;
113
+ <a href="#M000026">new</a>&nbsp;&nbsp;
114
+ <a href="#M000030">print_component</a>&nbsp;&nbsp;
115
+ <a href="#M000032">print_parameter</a>&nbsp;&nbsp;
116
+ <a href="#M000031">print_properties</a>&nbsp;&nbsp;
117
+ <a href="#M000039">respond_to?</a>&nbsp;&nbsp;
118
+ <a href="#M000029">to_ical</a>&nbsp;&nbsp;
119
119
  </div>
120
120
  </div>
121
121
 
@@ -160,19 +160,19 @@ an <a href="Alarm.html">Alarm</a>.
160
160
  <div id="methods">
161
161
  <h3 class="section-bar">Public Class methods</h3>
162
162
 
163
- <div id="method-M000025" class="method-detail">
164
- <a name="M000025"></a>
163
+ <div id="method-M000026" class="method-detail">
164
+ <a name="M000026"></a>
165
165
 
166
166
  <div class="method-heading">
167
- <a href="#M000025" class="method-signature">
167
+ <a href="#M000026" class="method-signature">
168
168
  <span class="method-name">new</span><span class="method-args">(name)</span>
169
169
  </a>
170
170
  </div>
171
171
 
172
172
  <div class="method-description">
173
173
  <p><a class="source-toggle" href="#"
174
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
175
- <div class="method-source-code" id="M000025-source">
174
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
175
+ <div class="method-source-code" id="M000026-source">
176
176
  <pre>
177
177
  <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 26</span>
178
178
  26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
@@ -190,11 +190,11 @@ an <a href="Alarm.html">Alarm</a>.
190
190
 
191
191
  <h3 class="section-bar">Protected Class methods</h3>
192
192
 
193
- <div id="method-M000034" class="method-detail">
194
- <a name="M000034"></a>
193
+ <div id="method-M000035" class="method-detail">
194
+ <a name="M000035"></a>
195
195
 
196
196
  <div class="method-heading">
197
- <a href="#M000034" class="method-signature">
197
+ <a href="#M000035" class="method-signature">
198
198
  <span class="method-name">ical_component</span><span class="method-args">(*syms)</span>
199
199
  </a>
200
200
  </div>
@@ -204,23 +204,23 @@ an <a href="Alarm.html">Alarm</a>.
204
204
  Make it protected so we can monitor usage&#8230;
205
205
  </p>
206
206
  <p><a class="source-toggle" href="#"
207
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
208
- <div class="method-source-code" id="M000034-source">
207
+ onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
208
+ <div class="method-source-code" id="M000035-source">
209
209
  <pre>
210
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 129</span>
211
- 129: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_component</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
212
- 130: <span class="ruby-identifier">hash_accessor</span> <span class="ruby-identifier">:@components</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>
213
- 131: <span class="ruby-keyword kw">end</span>
210
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 130</span>
211
+ 130: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_component</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
212
+ 131: <span class="ruby-identifier">hash_accessor</span> <span class="ruby-identifier">:@components</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>
213
+ 132: <span class="ruby-keyword kw">end</span>
214
214
  </pre>
215
215
  </div>
216
216
  </div>
217
217
  </div>
218
218
 
219
- <div id="method-M000036" class="method-detail">
220
- <a name="M000036"></a>
219
+ <div id="method-M000037" class="method-detail">
220
+ <a name="M000037"></a>
221
221
 
222
222
  <div class="method-heading">
223
- <a href="#M000036" class="method-signature">
223
+ <a href="#M000037" class="method-signature">
224
224
  <span class="method-name">ical_multi_property</span><span class="method-args">(property, singular, plural)</span>
225
225
  </a>
226
226
  </div>
@@ -231,73 +231,73 @@ Define a set of methods defining a new property, which supports multiple
231
231
  values for the same property name.
232
232
  </p>
233
233
  <p><a class="source-toggle" href="#"
234
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
235
- <div class="method-source-code" id="M000036-source">
234
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
235
+ <div class="method-source-code" id="M000037-source">
236
236
  <pre>
237
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 201</span>
238
- 201: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_multi_property</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">singular</span>, <span class="ruby-identifier">plural</span>)
239
- 202: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{property}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">upcase</span>
240
- 203: <span class="ruby-identifier">singular</span> = <span class="ruby-node">&quot;#{singular}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
241
- 204: <span class="ruby-identifier">plural</span> = <span class="ruby-node">&quot;#{plural}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
242
- 205:
243
- 206: <span class="ruby-identifier">getter</span> = <span class="ruby-node">&quot;#{plural}&quot;</span>
244
- 207: <span class="ruby-identifier">setter</span> = <span class="ruby-node">&quot;#{plural}=&quot;</span>
245
- 208: <span class="ruby-identifier">adder</span> = <span class="ruby-node">&quot;add_#{singular}&quot;</span>
246
- 209: <span class="ruby-identifier">remover</span> = <span class="ruby-node">&quot;remove_#{singular}&quot;</span>
247
- 210: <span class="ruby-identifier">query</span> = <span class="ruby-node">&quot;#{plural}?&quot;</span>
248
- 211:
249
- 212: <span class="ruby-comment cmt"># Set this key so the parser knows to use an array for</span>
250
- 213: <span class="ruby-comment cmt"># storing this property type.</span>
251
- 214: <span class="ruby-ivar">@@multi_properties</span>[<span class="ruby-node">&quot;#{property}&quot;</span>] = <span class="ruby-keyword kw">true</span>
252
- 215:
253
- 216: <span class="ruby-comment cmt"># Getter for whole array</span>
254
- 217: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">getter</span>
255
- 218: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{getter}(*a)\nif a.empty?\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;]\nelse\n[]\nend\nelse\nself.\#{setter}(a.first)\nend\nend\n&quot;</span>
256
- 219:
257
- 220: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">186</span>
258
- 221: <span class="ruby-keyword kw">end</span>
259
- 222:
260
- 223: <span class="ruby-comment cmt"># Setter for whole array</span>
261
- 224: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">setter</span>
262
- 225: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{setter}(a)\nif a.respond_to?(:to_ary)\na.to_ary.each do |val|\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Property values do not support to_ical method!\&quot;)\nend\nend\n\n@properties[\&quot;\#{property}\&quot;] = a.to_ary\n\nelse\nraise ArgumentError, \&quot;\#{getter} is a multi-property that must be an array! Use the \#{adder} method to add single entries.\&quot;\nend\nend\n&quot;</span>
263
- 226:
264
- 227: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">198</span>
265
- 228: <span class="ruby-keyword kw">end</span>
266
- 229:
267
- 230: <span class="ruby-comment cmt"># Query for any of these properties</span>
268
- 231: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">query</span>
269
- 232: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{query}\n@properties.has_key?(\&quot;\#{property}\&quot;)\nend\n&quot;</span>
270
- 233:
271
- 234: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">210</span>
272
- 235: <span class="ruby-keyword kw">end</span>
273
- 236:
274
- 237: <span class="ruby-comment cmt"># Add another item to this properties array</span>
275
- 238: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">adder</span>
276
- 239: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{adder}(val, params = {})\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Property value object does not support to_ical method!\&quot;)\nend\n\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;] &lt;&lt; val\nelse\n@properties[\&quot;\#{property}\&quot;] = [val]\nend\nend\n&quot;</span>
277
- 240:
278
- 241: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">228</span>
279
- 242: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;add_#{property.downcase}&quot;</span>, <span class="ruby-node">&quot;#{adder}&quot;</span>)
280
- 243: <span class="ruby-keyword kw">end</span>
281
- 244:
282
- 245: <span class="ruby-comment cmt"># Remove an item from this properties array</span>
283
- 246: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">remover</span>
284
- 247: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{remover}(a)\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;].delete(a)\nend\nend\n&quot;</span>
285
- 248:
286
- 249: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">241</span>
287
- 250: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;remove_#{property.downcase}&quot;</span>, <span class="ruby-node">&quot;#{remover}&quot;</span>)
288
- 251: <span class="ruby-keyword kw">end</span>
289
- 252:
290
- 253: <span class="ruby-keyword kw">end</span>
237
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 202</span>
238
+ 202: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_multi_property</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">singular</span>, <span class="ruby-identifier">plural</span>)
239
+ 203: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{property}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">upcase</span>
240
+ 204: <span class="ruby-identifier">singular</span> = <span class="ruby-node">&quot;#{singular}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
241
+ 205: <span class="ruby-identifier">plural</span> = <span class="ruby-node">&quot;#{plural}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
242
+ 206:
243
+ 207: <span class="ruby-identifier">getter</span> = <span class="ruby-node">&quot;#{plural}&quot;</span>
244
+ 208: <span class="ruby-identifier">setter</span> = <span class="ruby-node">&quot;#{plural}=&quot;</span>
245
+ 209: <span class="ruby-identifier">adder</span> = <span class="ruby-node">&quot;add_#{singular}&quot;</span>
246
+ 210: <span class="ruby-identifier">remover</span> = <span class="ruby-node">&quot;remove_#{singular}&quot;</span>
247
+ 211: <span class="ruby-identifier">query</span> = <span class="ruby-node">&quot;#{plural}?&quot;</span>
248
+ 212:
249
+ 213: <span class="ruby-comment cmt"># Set this key so the parser knows to use an array for</span>
250
+ 214: <span class="ruby-comment cmt"># storing this property type.</span>
251
+ 215: <span class="ruby-ivar">@@multi_properties</span>[<span class="ruby-node">&quot;#{property}&quot;</span>] = <span class="ruby-keyword kw">true</span>
252
+ 216:
253
+ 217: <span class="ruby-comment cmt"># Getter for whole array</span>
254
+ 218: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">getter</span>
255
+ 219: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{getter}(*a)\nif a.empty?\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;]\nelse\n[]\nend\nelse\nself.\#{setter}(a.first)\nend\nend\n&quot;</span>
256
+ 220:
257
+ 221: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">186</span>
258
+ 222: <span class="ruby-keyword kw">end</span>
259
+ 223:
260
+ 224: <span class="ruby-comment cmt"># Setter for whole array</span>
261
+ 225: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">setter</span>
262
+ 226: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{setter}(a)\nif a.respond_to?(:to_ary)\na.to_ary.each do |val|\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Property values do not support to_ical method!\&quot;)\nend\nend\n\n@properties[\&quot;\#{property}\&quot;] = a.to_ary\n\nelse\nraise ArgumentError, \&quot;\#{getter} is a multi-property that must be an array! Use the \#{adder} method to add single entries.\&quot;\nend\nend\n&quot;</span>
263
+ 227:
264
+ 228: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">198</span>
265
+ 229: <span class="ruby-keyword kw">end</span>
266
+ 230:
267
+ 231: <span class="ruby-comment cmt"># Query for any of these properties</span>
268
+ 232: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">query</span>
269
+ 233: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{query}\n@properties.has_key?(\&quot;\#{property}\&quot;)\nend\n&quot;</span>
270
+ 234:
271
+ 235: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">210</span>
272
+ 236: <span class="ruby-keyword kw">end</span>
273
+ 237:
274
+ 238: <span class="ruby-comment cmt"># Add another item to this properties array</span>
275
+ 239: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">adder</span>
276
+ 240: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{adder}(val, params = {})\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Property value object does not support to_ical method!\&quot;)\nend\n\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;] &lt;&lt; val\nelse\n@properties[\&quot;\#{property}\&quot;] = [val]\nend\nend\n&quot;</span>
277
+ 241:
278
+ 242: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">228</span>
279
+ 243: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;add_#{property.downcase}&quot;</span>, <span class="ruby-node">&quot;#{adder}&quot;</span>)
280
+ 244: <span class="ruby-keyword kw">end</span>
281
+ 245:
282
+ 246: <span class="ruby-comment cmt"># Remove an item from this properties array</span>
283
+ 247: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">remover</span>
284
+ 248: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{remover}(a)\nif @properties.has_key?(\&quot;\#{property}\&quot;)\n@properties[\&quot;\#{property}\&quot;].delete(a)\nend\nend\n&quot;</span>
285
+ 249:
286
+ 250: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">241</span>
287
+ 251: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;remove_#{property.downcase}&quot;</span>, <span class="ruby-node">&quot;#{remover}&quot;</span>)
288
+ 252: <span class="ruby-keyword kw">end</span>
289
+ 253:
290
+ 254: <span class="ruby-keyword kw">end</span>
291
291
  </pre>
292
292
  </div>
293
293
  </div>
294
294
  </div>
295
295
 
296
- <div id="method-M000035" class="method-detail">
297
- <a name="M000035"></a>
296
+ <div id="method-M000036" class="method-detail">
297
+ <a name="M000036"></a>
298
298
 
299
299
  <div class="method-heading">
300
- <a href="#M000035" class="method-signature">
300
+ <a href="#M000036" class="method-signature">
301
301
  <span class="method-name">ical_property</span><span class="method-args">(property, alias_name = nil, prop_name = nil)</span>
302
302
  </a>
303
303
  </div>
@@ -307,50 +307,50 @@ values for the same property name.
307
307
  Define a set of methods supporting a new property
308
308
  </p>
309
309
  <p><a class="source-toggle" href="#"
310
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
311
- <div class="method-source-code" id="M000035-source">
310
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
311
+ <div class="method-source-code" id="M000036-source">
312
312
  <pre>
313
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 134</span>
314
- 134: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_property</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">alias_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">prop_name</span> = <span class="ruby-keyword kw">nil</span>)
315
- 135:
316
- 136: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{property}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
317
- 137: <span class="ruby-identifier">getter</span> = <span class="ruby-node">&quot;#{property}&quot;</span>
318
- 138: <span class="ruby-identifier">setter</span> = <span class="ruby-node">&quot;#{property}=&quot;</span>
319
- 139: <span class="ruby-identifier">query</span> = <span class="ruby-node">&quot;#{property}?&quot;</span>
320
- 140: <span class="ruby-identifier">alias_name</span> = <span class="ruby-node">&quot;#{alias_name}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
321
- 141:
322
- 142: <span class="ruby-comment cmt"># If a prop_name was given then we use that for the actual storage</span>
323
- 143: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{prop_name}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop_name</span>.<span class="ruby-identifier">nil?</span>
324
- 144:
325
- 145: <span class="ruby-comment cmt"># Change underscores in property name to a dash</span>
326
- 146: <span class="ruby-identifier">property</span>[<span class="ruby-regexp re">/_/</span>] = <span class="ruby-value str">'-'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/_/</span>
327
- 147:
328
- 148: <span class="ruby-comment cmt"># All properties names are stored in caps...</span>
329
- 149: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">property</span>.<span class="ruby-identifier">upcase</span>
330
- 150:
331
- 151: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">getter</span>
332
- 152: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{getter}(val = nil, params = {})\nif val.nil?\n@properties[\&quot;\#{property}\&quot;]\nelse\n# Set the value just like normal\nself.\#{setter}(val)\nend\nend\n&quot;</span>
333
- 153:
334
- 154: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">155</span>
335
- 155: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}&quot;</span>, <span class="ruby-node">&quot;#{getter}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
336
- 156: <span class="ruby-keyword kw">end</span>
337
- 157:
338
- 158: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">setter</span>
339
- 159: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{setter}(val)\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Value of type (\&quot; + val.class.to_s + \&quot;) does not support to_ical method!\&quot;)\nend\n\n@properties[\&quot;\#{property}\&quot;] = val\nend\n&quot;</span>
340
- 160:
341
- 161: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">171</span>
342
- 162:
343
- 163: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}=&quot;</span>, <span class="ruby-node">&quot;#{setter}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
344
- 164: <span class="ruby-keyword kw">end</span>
345
- 165:
346
- 166: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">query</span>
347
- 167: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{query}\n@properties.has_key?(\&quot;\#{property}\&quot;)\nend\n&quot;</span>
348
- 168:
349
- 169: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">183</span>
350
- 170:
351
- 171: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}\?&quot;</span>, <span class="ruby-node">&quot;#{query}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
352
- 172: <span class="ruby-keyword kw">end</span>
353
- 173: <span class="ruby-keyword kw">end</span>
313
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 135</span>
314
+ 135: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_property</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">alias_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">prop_name</span> = <span class="ruby-keyword kw">nil</span>)
315
+ 136:
316
+ 137: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{property}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
317
+ 138: <span class="ruby-identifier">getter</span> = <span class="ruby-node">&quot;#{property}&quot;</span>
318
+ 139: <span class="ruby-identifier">setter</span> = <span class="ruby-node">&quot;#{property}=&quot;</span>
319
+ 140: <span class="ruby-identifier">query</span> = <span class="ruby-node">&quot;#{property}?&quot;</span>
320
+ 141: <span class="ruby-identifier">alias_name</span> = <span class="ruby-node">&quot;#{alias_name}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
321
+ 142:
322
+ 143: <span class="ruby-comment cmt"># If a prop_name was given then we use that for the actual storage</span>
323
+ 144: <span class="ruby-identifier">property</span> = <span class="ruby-node">&quot;#{prop_name}&quot;</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop_name</span>.<span class="ruby-identifier">nil?</span>
324
+ 145:
325
+ 146: <span class="ruby-comment cmt"># Change underscores in property name to a dash</span>
326
+ 147: <span class="ruby-identifier">property</span>[<span class="ruby-regexp re">/_/</span>] = <span class="ruby-value str">'-'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">property</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/_/</span>
327
+ 148:
328
+ 149: <span class="ruby-comment cmt"># All properties names are stored in caps...</span>
329
+ 150: <span class="ruby-identifier">property</span> = <span class="ruby-identifier">property</span>.<span class="ruby-identifier">upcase</span>
330
+ 151:
331
+ 152: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">getter</span>
332
+ 153: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{getter}(val = nil, params = {})\nif val.nil?\n@properties[\&quot;\#{property}\&quot;]\nelse\n# Set the value just like normal\nself.\#{setter}(val)\nend\nend\n&quot;</span>
333
+ 154:
334
+ 155: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">155</span>
335
+ 156: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}&quot;</span>, <span class="ruby-node">&quot;#{getter}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
336
+ 157: <span class="ruby-keyword kw">end</span>
337
+ 158:
338
+ 159: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">setter</span>
339
+ 160: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{setter}(val)\nunless val.respond_to?(:to_ical)\nraise(NotImplementedError, \&quot;Value of type (\&quot; + val.class.to_s + \&quot;) does not support to_ical method!\&quot;)\nend\n\n@properties[\&quot;\#{property}\&quot;] = val\nend\n&quot;</span>
340
+ 161:
341
+ 162: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">171</span>
342
+ 163:
343
+ 164: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}=&quot;</span>, <span class="ruby-node">&quot;#{setter}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
344
+ 165: <span class="ruby-keyword kw">end</span>
345
+ 166:
346
+ 167: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">query</span>
347
+ 168: <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;def \#{query}\n@properties.has_key?(\&quot;\#{property}\&quot;)\nend\n&quot;</span>
348
+ 169:
349
+ 170: <span class="ruby-identifier">class_eval</span> <span class="ruby-identifier">code</span>, <span class="ruby-value str">&quot;component.rb&quot;</span>, <span class="ruby-value">183</span>
350
+ 171:
351
+ 172: <span class="ruby-identifier">alias_method</span>(<span class="ruby-node">&quot;#{alias_name}\?&quot;</span>, <span class="ruby-node">&quot;#{query}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">alias_name</span>.<span class="ruby-identifier">nil?</span>
352
+ 173: <span class="ruby-keyword kw">end</span>
353
+ 174: <span class="ruby-keyword kw">end</span>
354
354
  </pre>
355
355
  </div>
356
356
  </div>
@@ -358,8 +358,8 @@ Define a set of methods supporting a new property
358
358
 
359
359
  <h3 class="section-bar">Public Instance methods</h3>
360
360
 
361
- <div id="method-M000027" class="method-detail">
362
- <a name="M000027"></a>
361
+ <div id="method-M000028" class="method-detail">
362
+ <a name="M000028"></a>
363
363
 
364
364
  <div class="method-heading">
365
365
  <span class="method-name">add</span><span class="method-args">(component)</span>
@@ -367,16 +367,16 @@ Define a set of methods supporting a new property
367
367
 
368
368
  <div class="method-description">
369
369
  <p>
370
- Alias for <a href="Component.html#M000026">add_component</a>
370
+ Alias for <a href="Component.html#M000027">add_component</a>
371
371
  </p>
372
372
  </div>
373
373
  </div>
374
374
 
375
- <div id="method-M000026" class="method-detail">
376
- <a name="M000026"></a>
375
+ <div id="method-M000027" class="method-detail">
376
+ <a name="M000027"></a>
377
377
 
378
378
  <div class="method-heading">
379
- <a href="#M000026" class="method-signature">
379
+ <a href="#M000027" class="method-signature">
380
380
  <span class="method-name">add_component</span><span class="method-args">(component)</span>
381
381
  </a>
382
382
  </div>
@@ -386,8 +386,8 @@ Alias for <a href="Component.html#M000026">add_component</a>
386
386
  Add a sub-component to the current component object.
387
387
  </p>
388
388
  <p><a class="source-toggle" href="#"
389
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
390
- <div class="method-source-code" id="M000026-source">
389
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
390
+ <div class="method-source-code" id="M000027-source">
391
391
  <pre>
392
392
  <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 36</span>
393
393
  36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_component</span>(<span class="ruby-identifier">component</span>)
@@ -404,11 +404,11 @@ Add a sub-component to the current component object.
404
404
  </div>
405
405
  </div>
406
406
 
407
- <div id="method-M000032" class="method-detail">
408
- <a name="M000032"></a>
407
+ <div id="method-M000033" class="method-detail">
408
+ <a name="M000033"></a>
409
409
 
410
410
  <div class="method-heading">
411
- <a href="#M000032" class="method-signature">
411
+ <a href="#M000033" class="method-signature">
412
412
  <span class="method-name">custom_property</span><span class="method-args">(name, value)</span>
413
413
  </a>
414
414
  </div>
@@ -418,46 +418,46 @@ Add a sub-component to the current component object.
418
418
  TODO: Look into the x-property, x-param stuff&#8230;
419
419
  </p>
420
420
  <p><a class="source-toggle" href="#"
421
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
422
- <div class="method-source-code" id="M000032-source">
421
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
422
+ <div class="method-source-code" id="M000033-source">
423
423
  <pre>
424
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 118</span>
425
- 118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">custom_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
426
- 119: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
427
- 120: <span class="ruby-keyword kw">end</span>
424
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 119</span>
425
+ 119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">custom_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
426
+ 120: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
427
+ 121: <span class="ruby-keyword kw">end</span>
428
428
  </pre>
429
429
  </div>
430
430
  </div>
431
431
  </div>
432
432
 
433
- <div id="method-M000033" class="method-detail">
434
- <a name="M000033"></a>
433
+ <div id="method-M000034" class="method-detail">
434
+ <a name="M000034"></a>
435
435
 
436
436
  <div class="method-heading">
437
- <a href="#M000033" class="method-signature">
437
+ <a href="#M000034" class="method-signature">
438
438
  <span class="method-name">multi_property?</span><span class="method-args">(name)</span>
439
439
  </a>
440
440
  </div>
441
441
 
442
442
  <div class="method-description">
443
443
  <p><a class="source-toggle" href="#"
444
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
445
- <div class="method-source-code" id="M000033-source">
444
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
445
+ <div class="method-source-code" id="M000034-source">
446
446
  <pre>
447
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 122</span>
448
- 122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multi_property?</span>(<span class="ruby-identifier">name</span>)
449
- 123: <span class="ruby-ivar">@@multi_properties</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">upcase</span>)
450
- 124: <span class="ruby-keyword kw">end</span>
447
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 123</span>
448
+ 123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multi_property?</span>(<span class="ruby-identifier">name</span>)
449
+ 124: <span class="ruby-ivar">@@multi_properties</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">upcase</span>)
450
+ 125: <span class="ruby-keyword kw">end</span>
451
451
  </pre>
452
452
  </div>
453
453
  </div>
454
454
  </div>
455
455
 
456
- <div id="method-M000029" class="method-detail">
457
- <a name="M000029"></a>
456
+ <div id="method-M000030" class="method-detail">
457
+ <a name="M000030"></a>
458
458
 
459
459
  <div class="method-heading">
460
- <a href="#M000029" class="method-signature">
460
+ <a href="#M000030" class="method-signature">
461
461
  <span class="method-name">print_component</span><span class="method-args">() {|s| ...}</span>
462
462
  </a>
463
463
  </div>
@@ -467,8 +467,8 @@ TODO: Look into the x-property, x-param stuff&#8230;
467
467
  Print this icalendar component
468
468
  </p>
469
469
  <p><a class="source-toggle" href="#"
470
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
471
- <div class="method-source-code" id="M000029-source">
470
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
471
+ <div class="method-source-code" id="M000030-source">
472
472
  <pre>
473
473
  <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 57</span>
474
474
  57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_component</span>
@@ -491,11 +491,11 @@ Print this icalendar component
491
491
  </div>
492
492
  </div>
493
493
 
494
- <div id="method-M000031" class="method-detail">
495
- <a name="M000031"></a>
494
+ <div id="method-M000032" class="method-detail">
495
+ <a name="M000032"></a>
496
496
 
497
497
  <div class="method-heading">
498
- <a href="#M000031" class="method-signature">
498
+ <a href="#M000032" class="method-signature">
499
499
  <span class="method-name">print_parameter</span><span class="method-args">(s, key, value)</span>
500
500
  </a>
501
501
  </div>
@@ -505,42 +505,42 @@ Print this icalendar component
505
505
  Print the parameters for a specific property
506
506
  </p>
507
507
  <p><a class="source-toggle" href="#"
508
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
509
- <div class="method-source-code" id="M000031-source">
508
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
509
+ <div class="method-source-code" id="M000032-source">
510
510
  <pre>
511
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 94</span>
512
- 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_parameter</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
513
- 95: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property_params</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
514
- 96: <span class="ruby-identifier">params</span> = <span class="ruby-ivar">@property_params</span>[<span class="ruby-identifier">key</span>]
515
- 97: <span class="ruby-identifier">params</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
516
- 98: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;;#{key}&quot;</span>
517
- 99: <span class="ruby-identifier">val</span> = [ <span class="ruby-identifier">val</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_ary</span>)
518
- 100:
519
- 101: <span class="ruby-comment cmt"># Possible parameter values</span>
520
- 102: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">empty?</span>
521
- 103: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;=&quot;</span>
522
- 104: <span class="ruby-identifier">sep</span> = <span class="ruby-value str">&quot;&quot;</span> <span class="ruby-comment cmt"># First entry comes after = sign, but then we need commas</span>
523
- 105: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pval</span><span class="ruby-operator">|</span>
524
- 106: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pval</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_ical</span>
525
- 107: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sep</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">pval</span>.<span class="ruby-identifier">to_ical</span>
526
- 108: <span class="ruby-identifier">sep</span> = <span class="ruby-value str">&quot;,&quot;</span>
527
- 109: <span class="ruby-keyword kw">end</span>
528
- 110: <span class="ruby-keyword kw">end</span>
529
- 111: <span class="ruby-keyword kw">end</span>
530
- 112:
531
- 113: <span class="ruby-keyword kw">end</span>
532
- 114: <span class="ruby-keyword kw">end</span>
533
- 115: <span class="ruby-keyword kw">end</span>
511
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 95</span>
512
+ 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_parameter</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
513
+ 96: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@property_params</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
514
+ 97: <span class="ruby-identifier">params</span> = <span class="ruby-ivar">@property_params</span>[<span class="ruby-identifier">key</span>]
515
+ 98: <span class="ruby-identifier">params</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
516
+ 99: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;;#{key}&quot;</span>
517
+ 100: <span class="ruby-identifier">val</span> = [ <span class="ruby-identifier">val</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_ary</span>)
518
+ 101:
519
+ 102: <span class="ruby-comment cmt"># Possible parameter values</span>
520
+ 103: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">empty?</span>
521
+ 104: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;=&quot;</span>
522
+ 105: <span class="ruby-identifier">sep</span> = <span class="ruby-value str">&quot;&quot;</span> <span class="ruby-comment cmt"># First entry comes after = sign, but then we need commas</span>
523
+ 106: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pval</span><span class="ruby-operator">|</span>
524
+ 107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pval</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_ical</span>
525
+ 108: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sep</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">pval</span>.<span class="ruby-identifier">to_ical</span>
526
+ 109: <span class="ruby-identifier">sep</span> = <span class="ruby-value str">&quot;,&quot;</span>
527
+ 110: <span class="ruby-keyword kw">end</span>
528
+ 111: <span class="ruby-keyword kw">end</span>
529
+ 112: <span class="ruby-keyword kw">end</span>
530
+ 113:
531
+ 114: <span class="ruby-keyword kw">end</span>
532
+ 115: <span class="ruby-keyword kw">end</span>
533
+ 116: <span class="ruby-keyword kw">end</span>
534
534
  </pre>
535
535
  </div>
536
536
  </div>
537
537
  </div>
538
538
 
539
- <div id="method-M000030" class="method-detail">
540
- <a name="M000030"></a>
539
+ <div id="method-M000031" class="method-detail">
540
+ <a name="M000031"></a>
541
541
 
542
542
  <div class="method-heading">
543
- <a href="#M000030" class="method-signature">
543
+ <a href="#M000031" class="method-signature">
544
544
  <span class="method-name">print_properties</span><span class="method-args">(s)</span>
545
545
  </a>
546
546
  </div>
@@ -550,73 +550,74 @@ Print the parameters for a specific property
550
550
  Print this components properties
551
551
  </p>
552
552
  <p><a class="source-toggle" href="#"
553
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
554
- <div class="method-source-code" id="M000030-source">
553
+ onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
554
+ <div class="method-source-code" id="M000031-source">
555
555
  <pre>
556
556
  <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 74</span>
557
557
  74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_properties</span>(<span class="ruby-identifier">s</span>)
558
558
  75: <span class="ruby-ivar">@properties</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
559
- 76: <span class="ruby-comment cmt"># Take out underscore for property names that conflicted</span>
560
- 77: <span class="ruby-comment cmt"># with built-in words.</span>
561
- 78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/ip_.*/</span>
562
- 79: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>[<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
563
- 80: <span class="ruby-keyword kw">end</span>
564
- 81:
565
- 82: <span class="ruby-comment cmt"># Property name</span>
566
- 83: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{key.upcase}&quot;</span>
567
- 84:
568
- 85: <span class="ruby-comment cmt"># Possible parameters</span>
569
- 86: <span class="ruby-identifier">print_parameter</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
570
- 87:
571
- 88: <span class="ruby-comment cmt"># Property value</span>
572
- 89: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;:#{value.to_ical}\r\n&quot;</span>
573
- 90: <span class="ruby-keyword kw">end</span>
574
- 91: <span class="ruby-keyword kw">end</span>
559
+ 76:
560
+ 77: <span class="ruby-comment cmt"># Take out underscore for property names that conflicted</span>
561
+ 78: <span class="ruby-comment cmt"># with built-in words.</span>
562
+ 79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/ip_.*/</span>
563
+ 80: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>[<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
564
+ 81: <span class="ruby-keyword kw">end</span>
565
+ 82:
566
+ 83: <span class="ruby-comment cmt"># Property name</span>
567
+ 84: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{key.upcase}&quot;</span>
568
+ 85:
569
+ 86: <span class="ruby-comment cmt"># Possible parameters</span>
570
+ 87: <span class="ruby-identifier">print_parameter</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
571
+ 88:
572
+ 89: <span class="ruby-comment cmt"># Property value</span>
573
+ 90: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;:#{value.to_ical}\r\n&quot;</span>
574
+ 91: <span class="ruby-keyword kw">end</span>
575
+ 92: <span class="ruby-keyword kw">end</span>
575
576
  </pre>
576
577
  </div>
577
578
  </div>
578
579
  </div>
579
580
 
580
- <div id="method-M000038" class="method-detail">
581
- <a name="M000038"></a>
581
+ <div id="method-M000039" class="method-detail">
582
+ <a name="M000039"></a>
582
583
 
583
584
  <div class="method-heading">
584
- <a href="#M000038" class="method-signature">
585
+ <a href="#M000039" class="method-signature">
585
586
  <span class="method-name">respond_to?</span><span class="method-args">(method_name)</span>
586
587
  </a>
587
588
  </div>
588
589
 
589
590
  <div class="method-description">
590
591
  <p><a class="source-toggle" href="#"
591
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
592
- <div class="method-source-code" id="M000038-source">
592
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
593
+ <div class="method-source-code" id="M000039-source">
593
594
  <pre>
594
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 333</span>
595
- 333: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>)
596
- 334: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x-.*/</span>
597
- 335: <span class="ruby-keyword kw">super</span>
598
- 336: <span class="ruby-keyword kw">end</span>
599
- 337:
600
- 338: <span class="ruby-keyword kw">true</span>
601
- 339: <span class="ruby-keyword kw">end</span>
595
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 334</span>
596
+ 334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>)
597
+ 335: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x-.*/</span>
598
+ 336: <span class="ruby-keyword kw">super</span>
599
+ 337: <span class="ruby-keyword kw">end</span>
600
+ 338:
601
+ 339: <span class="ruby-keyword kw">true</span>
602
+ 340: <span class="ruby-keyword kw">end</span>
602
603
  </pre>
603
604
  </div>
604
605
  </div>
605
606
  </div>
606
607
 
607
- <div id="method-M000028" class="method-detail">
608
- <a name="M000028"></a>
608
+ <div id="method-M000029" class="method-detail">
609
+ <a name="M000029"></a>
609
610
 
610
611
  <div class="method-heading">
611
- <a href="#M000028" class="method-signature">
612
+ <a href="#M000029" class="method-signature">
612
613
  <span class="method-name">to_ical</span><span class="method-args">()</span>
613
614
  </a>
614
615
  </div>
615
616
 
616
617
  <div class="method-description">
617
618
  <p><a class="source-toggle" href="#"
618
- onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
619
- <div class="method-source-code" id="M000028-source">
619
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
620
+ <div class="method-source-code" id="M000029-source">
620
621
  <pre>
621
622
  <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 48</span>
622
623
  48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ical</span>
@@ -633,42 +634,42 @@ Print this components properties
633
634
 
634
635
  <h3 class="section-bar">Protected Instance methods</h3>
635
636
 
636
- <div id="method-M000037" class="method-detail">
637
- <a name="M000037"></a>
637
+ <div id="method-M000038" class="method-detail">
638
+ <a name="M000038"></a>
638
639
 
639
640
  <div class="method-heading">
640
- <a href="#M000037" class="method-signature">
641
+ <a href="#M000038" class="method-signature">
641
642
  <span class="method-name">method_missing</span><span class="method-args">(method_name, *args)</span>
642
643
  </a>
643
644
  </div>
644
645
 
645
646
  <div class="method-description">
646
647
  <p><a class="source-toggle" href="#"
647
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
648
- <div class="method-source-code" id="M000037-source">
648
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
649
+ <div class="method-source-code" id="M000038-source">
649
650
  <pre>
650
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 309</span>
651
- 309: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
652
- 310: <span class="ruby-identifier">method_name</span> = <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
653
- 311:
654
- 312: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x_.*/</span>
655
- 313: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>
656
- 314: <span class="ruby-keyword kw">end</span>
657
- 315:
658
- 316: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>
659
- 317:
660
- 318: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_ical</span>)
661
- 319: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">&quot;Value of type (&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;) does not support to_ical method!&quot;</span>)
662
- 320: <span class="ruby-keyword kw">end</span>
663
- 321:
664
- 322: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">method_name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.*)(=)/</span> <span class="ruby-comment cmt"># Its a setter</span>
665
- 323: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-identifier">val</span>
666
- 324: <span class="ruby-ivar">@@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Setting #{$1} =&gt; #{val}&quot;</span>)
667
- 325: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># Or its a getter</span>
668
- 326: <span class="ruby-ivar">@@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Getting #{method_name} =&gt; #{@properties[method_name]}&quot;</span>)
669
- 327: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">method_name</span>]
670
- 328: <span class="ruby-keyword kw">end</span>
671
- 329: <span class="ruby-keyword kw">end</span>
651
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 310</span>
652
+ 310: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
653
+ 311: <span class="ruby-identifier">method_name</span> = <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
654
+ 312:
655
+ 313: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x_.*/</span>
656
+ 314: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>
657
+ 315: <span class="ruby-keyword kw">end</span>
658
+ 316:
659
+ 317: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>
660
+ 318:
661
+ 319: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_ical</span>)
662
+ 320: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">&quot;Value of type (&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;) does not support to_ical method!&quot;</span>)
663
+ 321: <span class="ruby-keyword kw">end</span>
664
+ 322:
665
+ 323: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">method_name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.*)(=)/</span> <span class="ruby-comment cmt"># Its a setter</span>
666
+ 324: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-identifier">val</span>
667
+ 325: <span class="ruby-ivar">@@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Setting #{$1} =&gt; #{val}&quot;</span>)
668
+ 326: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># Or its a getter</span>
669
+ 327: <span class="ruby-ivar">@@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Getting #{method_name} =&gt; #{@properties[method_name]}&quot;</span>)
670
+ 328: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">method_name</span>]
671
+ 329: <span class="ruby-keyword kw">end</span>
672
+ 330: <span class="ruby-keyword kw">end</span>
672
673
  </pre>
673
674
  </div>
674
675
  </div>