icalendar 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/Rakefile +26 -3
  2. data/docs/api/classes/Array.html +155 -0
  3. data/docs/api/classes/Bignum.html +148 -0
  4. data/docs/api/classes/Date.html +172 -0
  5. data/docs/api/classes/DateTime.html +200 -0
  6. data/docs/api/classes/Fixnum.html +148 -0
  7. data/docs/api/classes/Float.html +148 -0
  8. data/docs/api/classes/HashAttrs.html +212 -0
  9. data/docs/api/classes/Icalendar/Alarm.html +228 -0
  10. data/docs/api/classes/Icalendar/Base.html +179 -0
  11. data/docs/api/classes/Icalendar/Calendar.html +504 -0
  12. data/docs/api/classes/Icalendar/Component.html +853 -0
  13. data/docs/api/classes/Icalendar/DateProp.html +187 -0
  14. data/docs/api/classes/Icalendar/DateProp/ClassMethods.html +195 -0
  15. data/docs/api/classes/Icalendar/Daylight.html +156 -0
  16. data/docs/api/classes/Icalendar/Event.html +671 -0
  17. data/docs/api/classes/Icalendar/Freebusy.html +266 -0
  18. data/docs/api/classes/Icalendar/Geo.html +211 -0
  19. data/docs/api/classes/Icalendar/InvalidPropertyValue.html +117 -0
  20. data/docs/api/classes/Icalendar/Journal.html +443 -0
  21. data/docs/api/classes/Icalendar/Parameter.html +166 -0
  22. data/docs/api/classes/Icalendar/Parser.html +352 -0
  23. data/docs/api/classes/Icalendar/RRule.html +428 -0
  24. data/docs/api/classes/Icalendar/RRule/Weekday.html +199 -0
  25. data/docs/api/classes/Icalendar/Standard.html +156 -0
  26. data/docs/api/classes/Icalendar/Timezone.html +450 -0
  27. data/docs/api/classes/Icalendar/Todo.html +480 -0
  28. data/docs/api/classes/Icalendar/TzidSupport.html +118 -0
  29. data/docs/api/classes/Icalendar/UnknownComponentClass.html +117 -0
  30. data/docs/api/classes/Icalendar/UnknownPropertyMethod.html +117 -0
  31. data/docs/api/classes/Object.html +272 -0
  32. data/docs/api/classes/String.html +148 -0
  33. data/docs/api/classes/TZInfo.html +119 -0
  34. data/docs/api/classes/TZInfo/Timezone.html +153 -0
  35. data/docs/api/classes/TZInfo/TimezonePeriod.html +200 -0
  36. data/docs/api/classes/TZInfo/TimezoneTransitionInfo.html +229 -0
  37. data/docs/api/classes/Time.html +180 -0
  38. data/docs/api/classes/URI.html +111 -0
  39. data/docs/api/classes/URI/Generic.html +148 -0
  40. data/docs/api/created.rid +1 -0
  41. data/docs/api/files/COPYING.html +163 -0
  42. data/docs/api/files/GPL.html +531 -0
  43. data/docs/api/files/README.html +401 -0
  44. data/docs/api/files/lib/hash_attrs_rb.html +107 -0
  45. data/docs/api/files/lib/icalendar/base_rb.html +108 -0
  46. data/docs/api/files/lib/icalendar/calendar_rb.html +101 -0
  47. data/docs/api/files/lib/icalendar/component/alarm_rb.html +101 -0
  48. data/docs/api/files/lib/icalendar/component/event_rb.html +101 -0
  49. data/docs/api/files/lib/icalendar/component/freebusy_rb.html +101 -0
  50. data/docs/api/files/lib/icalendar/component/journal_rb.html +101 -0
  51. data/docs/api/files/lib/icalendar/component/timezone_rb.html +101 -0
  52. data/docs/api/files/lib/icalendar/component/todo_rb.html +101 -0
  53. data/docs/api/files/lib/icalendar/component_rb.html +108 -0
  54. data/docs/api/files/lib/icalendar/conversions_rb.html +109 -0
  55. data/docs/api/files/lib/icalendar/helpers_rb.html +101 -0
  56. data/docs/api/files/lib/icalendar/parameter_rb.html +101 -0
  57. data/docs/api/files/lib/icalendar/parser_rb.html +110 -0
  58. data/docs/api/files/lib/icalendar/rrule_rb.html +110 -0
  59. data/docs/api/files/lib/icalendar/tzinfo_rb.html +101 -0
  60. data/docs/api/files/lib/icalendar_rb.html +121 -0
  61. data/docs/api/files/lib/meta_rb.html +107 -0
  62. data/docs/api/fr_class_index.html +64 -0
  63. data/docs/api/fr_file_index.html +47 -0
  64. data/docs/api/fr_method_index.html +123 -0
  65. data/docs/api/index.html +24 -0
  66. data/docs/api/rdoc-style.css +208 -0
  67. data/lib/icalendar.rb +1 -0
  68. data/lib/icalendar/component.rb +3 -3
  69. data/lib/icalendar/component/event.rb +1 -1
  70. data/lib/icalendar/component/freebusy.rb +1 -0
  71. data/lib/icalendar/conversions.rb +6 -0
  72. data/lib/icalendar/conversions.rb.orig +144 -0
  73. data/lib/icalendar/parser.rb +0 -94
  74. data/lib/icalendar/rrule.rb +133 -0
  75. data/test/component/timezone_test.rb +1 -1
  76. data/test/component_test.rb +10 -0
  77. data/test/conversions_test.rb +4 -4
  78. data/test/coverage/index.html +272 -0
  79. data/test/coverage/lib-hash_attrs_rb.html +235 -0
  80. data/test/coverage/lib-icalendar-base_rb.html +249 -0
  81. data/test/coverage/lib-icalendar-calendar_rb.html +324 -0
  82. data/test/coverage/lib-icalendar-component-alarm_rb.html +250 -0
  83. data/test/coverage/lib-icalendar-component-event_rb.html +353 -0
  84. data/test/coverage/lib-icalendar-component-freebusy_rb.html +245 -0
  85. data/test/coverage/lib-icalendar-component-journal_rb.html +278 -0
  86. data/test/coverage/lib-icalendar-component-timezone_rb.html +326 -0
  87. data/test/coverage/lib-icalendar-component-todo_rb.html +277 -0
  88. data/test/coverage/lib-icalendar-component_rb.html +733 -0
  89. data/test/coverage/lib-icalendar-conversions_rb.html +358 -0
  90. data/test/coverage/lib-icalendar-parser_rb.html +671 -0
  91. data/test/coverage/lib-icalendar-rrule_rb.html +357 -0
  92. data/test/coverage/lib-icalendar_rb.html +243 -0
  93. data/test/coverage/lib-meta_rb.html +234 -0
  94. data/test/fixtures/folding.ics +2 -2
  95. metadata +113 -36
  96. data/docs/api/STUB +0 -0
@@ -0,0 +1,853 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Icalendar::Component</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Icalendar::Component</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/icalendar/component_rb.html">
59
+ lib/icalendar/component.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Base.html">
69
+ Icalendar::Base
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ The body of the iCalendar object consists of a sequence of calendar
86
+ properties and one or more calendar components. The calendar properties are
87
+ attributes that apply to the calendar as a whole. The calendar components
88
+ are collections of properties that express a particular calendar semantic.
89
+ For example, the calendar component can specify an <a
90
+ href="Event.html">Event</a>, a <a href="Todo.html">Todo</a>, a <a
91
+ href="Journal.html">Journal</a> entry, <a href="Timezone.html">Timezone</a>
92
+ information, or <a href="Freebusy.html">Freebusy</a> time information, or
93
+ an <a href="Alarm.html">Alarm</a>.
94
+ </p>
95
+
96
+ </div>
97
+
98
+
99
+ </div>
100
+
101
+ <div id="method-list">
102
+ <h3 class="section-bar">Methods</h3>
103
+
104
+ <div class="name-list">
105
+ <a href="#M000073">add</a>&nbsp;&nbsp;
106
+ <a href="#M000072">add_component</a>&nbsp;&nbsp;
107
+ <a href="#M000074">add_event</a>&nbsp;&nbsp;
108
+ <a href="#M000076">add_journal</a>&nbsp;&nbsp;
109
+ <a href="#M000087">add_sliced_text</a>&nbsp;&nbsp;
110
+ <a href="#M000075">add_todo</a>&nbsp;&nbsp;
111
+ <a href="#M000089">custom_property</a>&nbsp;&nbsp;
112
+ <a href="#M000086">escape_chars</a>&nbsp;&nbsp;
113
+ <a href="#M000092">ical_component</a>&nbsp;&nbsp;
114
+ <a href="#M000094">ical_multi_property</a>&nbsp;&nbsp;
115
+ <a href="#M000095">ical_multiline_property</a>&nbsp;&nbsp;
116
+ <a href="#M000093">ical_property</a>&nbsp;&nbsp;
117
+ <a href="#M000090">multi_property?</a>&nbsp;&nbsp;
118
+ <a href="#M000091">multiline_property?</a>&nbsp;&nbsp;
119
+ <a href="#M000071">new</a>&nbsp;&nbsp;
120
+ <a href="#M000082">new_uid</a>&nbsp;&nbsp;
121
+ <a href="#M000084">print_component</a>&nbsp;&nbsp;
122
+ <a href="#M000088">print_parameters</a>&nbsp;&nbsp;
123
+ <a href="#M000085">print_properties</a>&nbsp;&nbsp;
124
+ <a href="#M000078">remove</a>&nbsp;&nbsp;
125
+ <a href="#M000077">remove_component</a>&nbsp;&nbsp;
126
+ <a href="#M000079">remove_event</a>&nbsp;&nbsp;
127
+ <a href="#M000081">remove_journal</a>&nbsp;&nbsp;
128
+ <a href="#M000080">remove_todo</a>&nbsp;&nbsp;
129
+ <a href="#M000096">respond_to?</a>&nbsp;&nbsp;
130
+ <a href="#M000083">to_ical</a>&nbsp;&nbsp;
131
+ </div>
132
+ </div>
133
+
134
+ </div>
135
+
136
+
137
+ <!-- if includes -->
138
+
139
+ <div id="section">
140
+
141
+
142
+
143
+
144
+
145
+ <div id="attribute-list">
146
+ <h3 class="section-bar">Attributes</h3>
147
+
148
+ <div class="name-list">
149
+ <table>
150
+ <tr class="top-aligned-row context-row">
151
+ <td class="context-item-name">name</td>
152
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
153
+ <td class="context-item-desc"></td>
154
+ </tr>
155
+ <tr class="top-aligned-row context-row">
156
+ <td class="context-item-name">properties</td>
157
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
158
+ <td class="context-item-desc"></td>
159
+ </tr>
160
+ </table>
161
+ </div>
162
+ </div>
163
+
164
+
165
+
166
+ <!-- if method_list -->
167
+ <div id="methods">
168
+ <h3 class="section-bar">Public Class methods</h3>
169
+
170
+ <div id="method-M000071" class="method-detail">
171
+ <a name="M000071"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="#M000071" class="method-signature">
175
+ <span class="method-name">new</span><span class="method-args">(name)</span>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+ <p><a class="source-toggle" href="#"
181
+ onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
182
+ <div class="method-source-code" id="M000071-source">
183
+ <pre>
184
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 46</span>
185
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
186
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
187
+ <span class="ruby-ivar">@components</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>([])
188
+ <span class="ruby-ivar">@properties</span> = {}
189
+
190
+ <span class="ruby-ivar">@@logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;New #{@name[1,@name.size].capitalize}...&quot;</span>)
191
+ <span class="ruby-keyword kw">end</span>
192
+ </pre>
193
+ </div>
194
+ </div>
195
+ </div>
196
+
197
+ <h3 class="section-bar">Protected Class methods</h3>
198
+
199
+ <div id="method-M000092" class="method-detail">
200
+ <a name="M000092"></a>
201
+
202
+ <div class="method-heading">
203
+ <a href="#M000092" class="method-signature">
204
+ <span class="method-name">ical_component</span><span class="method-args">(*syms)</span>
205
+ </a>
206
+ </div>
207
+
208
+ <div class="method-description">
209
+ <p>
210
+ Make it protected so we can monitor usage&#8230;
211
+ </p>
212
+ <p><a class="source-toggle" href="#"
213
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
214
+ <div class="method-source-code" id="M000092-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 213</span>
217
+ <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>)
218
+ <span class="ruby-identifier">hash_accessor</span> <span class="ruby-identifier">:@components</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>
219
+ <span class="ruby-keyword kw">end</span>
220
+ </pre>
221
+ </div>
222
+ </div>
223
+ </div>
224
+
225
+ <div id="method-M000094" class="method-detail">
226
+ <a name="M000094"></a>
227
+
228
+ <div class="method-heading">
229
+ <a href="#M000094" class="method-signature">
230
+ <span class="method-name">ical_multi_property</span><span class="method-args">(property, singular, plural)</span>
231
+ </a>
232
+ </div>
233
+
234
+ <div class="method-description">
235
+ <p>
236
+ Define a set of methods defining a <a href="Component.html#M000071">new</a>
237
+ property, which supports multiple values for the same property name.
238
+ </p>
239
+ <p><a class="source-toggle" href="#"
240
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
241
+ <div class="method-source-code" id="M000094-source">
242
+ <pre>
243
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 231</span>
244
+ <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>)
245
+ <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>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/-/</span>, <span class="ruby-value str">'_'</span>)
246
+ <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>
247
+
248
+ <span class="ruby-comment cmt"># Set this key so the parser knows to use an array for</span>
249
+ <span class="ruby-comment cmt"># storing this property type.</span>
250
+ <span class="ruby-ivar">@@multi_properties</span>[<span class="ruby-node">&quot;#{property}&quot;</span>] = <span class="ruby-keyword kw">true</span>
251
+
252
+ <span class="ruby-identifier">generate_multi_getter</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">plural</span>)
253
+ <span class="ruby-identifier">generate_multi_setter</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">plural</span>)
254
+ <span class="ruby-identifier">generate_multi_query</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">plural</span>)
255
+ <span class="ruby-identifier">generate_multi_adder</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">singular</span>)
256
+ <span class="ruby-identifier">generate_multi_remover</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">singular</span>)
257
+ <span class="ruby-keyword kw">end</span>
258
+ </pre>
259
+ </div>
260
+ </div>
261
+ </div>
262
+
263
+ <div id="method-M000095" class="method-detail">
264
+ <a name="M000095"></a>
265
+
266
+ <div class="method-heading">
267
+ <a href="#M000095" class="method-signature">
268
+ <span class="method-name">ical_multiline_property</span><span class="method-args">(property, singular, plural)</span>
269
+ </a>
270
+ </div>
271
+
272
+ <div class="method-description">
273
+ <p>
274
+ Define a set of methods defining a <a href="Component.html#M000071">new</a>
275
+ property, which supports multiple values in multiple lines with same
276
+ property name
277
+ </p>
278
+ <p><a class="source-toggle" href="#"
279
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
280
+ <div class="method-source-code" id="M000095-source">
281
+ <pre>
282
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 248</span>
283
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_multiline_property</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">singular</span>, <span class="ruby-identifier">plural</span>)
284
+ <span class="ruby-ivar">@@multiline_properties</span>[<span class="ruby-node">&quot;#{property}&quot;</span>] = <span class="ruby-keyword kw">true</span>
285
+ <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>)
286
+ <span class="ruby-keyword kw">end</span>
287
+ </pre>
288
+ </div>
289
+ </div>
290
+ </div>
291
+
292
+ <div id="method-M000093" class="method-detail">
293
+ <a name="M000093"></a>
294
+
295
+ <div class="method-heading">
296
+ <a href="#M000093" class="method-signature">
297
+ <span class="method-name">ical_property</span><span class="method-args">(property, alias_name = nil, prop_name = nil)</span>
298
+ </a>
299
+ </div>
300
+
301
+ <div class="method-description">
302
+ <p>
303
+ Define a set of methods supporting a <a
304
+ href="Component.html#M000071">new</a> property
305
+ </p>
306
+ <p><a class="source-toggle" href="#"
307
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
308
+ <div class="method-source-code" id="M000093-source">
309
+ <pre>
310
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 218</span>
311
+ <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>)
312
+ <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>
313
+ <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>
314
+ <span class="ruby-comment cmt"># If a prop_name was given then we use that for the actual storage</span>
315
+ <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">downcase</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop_name</span>.<span class="ruby-identifier">nil?</span>
316
+
317
+ <span class="ruby-identifier">generate_getter</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">alias_name</span>)
318
+ <span class="ruby-identifier">generate_setter</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">alias_name</span>)
319
+ <span class="ruby-identifier">generate_query</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">alias_name</span>)
320
+ <span class="ruby-keyword kw">end</span>
321
+ </pre>
322
+ </div>
323
+ </div>
324
+ </div>
325
+
326
+ <h3 class="section-bar">Public Instance methods</h3>
327
+
328
+ <div id="method-M000073" class="method-detail">
329
+ <a name="M000073"></a>
330
+
331
+ <div class="method-heading">
332
+ <span class="method-name">add</span><span class="method-args">(component)</span>
333
+ </div>
334
+
335
+ <div class="method-description">
336
+ <p>
337
+ Alias for <a href="Component.html#M000072">add_component</a>
338
+ </p>
339
+ </div>
340
+ </div>
341
+
342
+ <div id="method-M000072" class="method-detail">
343
+ <a name="M000072"></a>
344
+
345
+ <div class="method-heading">
346
+ <a href="#M000072" class="method-signature">
347
+ <span class="method-name">add_component</span><span class="method-args">(component)</span>
348
+ </a>
349
+ </div>
350
+
351
+ <div class="method-description">
352
+ <p>
353
+ Add a sub-component to the current component object.
354
+ </p>
355
+ <p><a class="source-toggle" href="#"
356
+ onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
357
+ <div class="method-source-code" id="M000072-source">
358
+ <pre>
359
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 55</span>
360
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_component</span>(<span class="ruby-identifier">component</span>)
361
+ <span class="ruby-identifier">key</span> = (<span class="ruby-identifier">component</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'s'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'icalendar::'</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">to_sym</span>
362
+
363
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span>
364
+ <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>] = []
365
+ <span class="ruby-keyword kw">end</span>
366
+
367
+ <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">component</span>
368
+ <span class="ruby-keyword kw">end</span>
369
+ </pre>
370
+ </div>
371
+ </div>
372
+ </div>
373
+
374
+ <div id="method-M000074" class="method-detail">
375
+ <a name="M000074"></a>
376
+
377
+ <div class="method-heading">
378
+ <span class="method-name">add_event</span><span class="method-args">(component)</span>
379
+ </div>
380
+
381
+ <div class="method-description">
382
+ <p>
383
+ Alias for <a href="Component.html#M000072">add_component</a>
384
+ </p>
385
+ </div>
386
+ </div>
387
+
388
+ <div id="method-M000076" class="method-detail">
389
+ <a name="M000076"></a>
390
+
391
+ <div class="method-heading">
392
+ <span class="method-name">add_journal</span><span class="method-args">(component)</span>
393
+ </div>
394
+
395
+ <div class="method-description">
396
+ <p>
397
+ Alias for <a href="Component.html#M000072">add_component</a>
398
+ </p>
399
+ </div>
400
+ </div>
401
+
402
+ <div id="method-M000087" class="method-detail">
403
+ <a name="M000087"></a>
404
+
405
+ <div class="method-heading">
406
+ <a href="#M000087" class="method-signature">
407
+ <span class="method-name">add_sliced_text</span><span class="method-args">(add_to,escaped)</span>
408
+ </a>
409
+ </div>
410
+
411
+ <div class="method-description">
412
+ <p><a class="source-toggle" href="#"
413
+ onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
414
+ <div class="method-source-code" id="M000087-source">
415
+ <pre>
416
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 165</span>
417
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_sliced_text</span>(<span class="ruby-identifier">add_to</span>,<span class="ruby-identifier">escaped</span>)
418
+ <span class="ruby-identifier">escaped</span> = <span class="ruby-identifier">escaped</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">''</span>) <span class="ruby-comment cmt"># split is unicdoe-aware when `$KCODE = 'u'`</span>
419
+ <span class="ruby-identifier">add_to</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">escaped</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">0</span>,<span class="ruby-constant">MAX_LINE_LENGTH</span>).<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\r\n &quot;</span> <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">escaped</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># shift(MAX_LINE_LENGTH) does not work with ruby 1.8.6</span>
420
+ <span class="ruby-identifier">add_to</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/ *$/</span>, <span class="ruby-value str">''</span>)
421
+ <span class="ruby-keyword kw">end</span>
422
+ </pre>
423
+ </div>
424
+ </div>
425
+ </div>
426
+
427
+ <div id="method-M000075" class="method-detail">
428
+ <a name="M000075"></a>
429
+
430
+ <div class="method-heading">
431
+ <span class="method-name">add_todo</span><span class="method-args">(component)</span>
432
+ </div>
433
+
434
+ <div class="method-description">
435
+ <p>
436
+ Alias for <a href="Component.html#M000072">add_component</a>
437
+ </p>
438
+ </div>
439
+ </div>
440
+
441
+ <div id="method-M000089" class="method-detail">
442
+ <a name="M000089"></a>
443
+
444
+ <div class="method-heading">
445
+ <a href="#M000089" class="method-signature">
446
+ <span class="method-name">custom_property</span><span class="method-args">(name, value)</span>
447
+ </a>
448
+ </div>
449
+
450
+ <div class="method-description">
451
+ <p>
452
+ TODO: Look into the x-property, x-param stuff&#8230; This would really only
453
+ be needed for subclassing to <a href="Component.html#M000073">add</a>
454
+ additional properties to an application using the API.
455
+ </p>
456
+ <p><a class="source-toggle" href="#"
457
+ onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
458
+ <div class="method-source-code" id="M000089-source">
459
+ <pre>
460
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 198</span>
461
+ <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>)
462
+ <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
463
+ <span class="ruby-keyword kw">end</span>
464
+ </pre>
465
+ </div>
466
+ </div>
467
+ </div>
468
+
469
+ <div id="method-M000086" class="method-detail">
470
+ <a name="M000086"></a>
471
+
472
+ <div class="method-heading">
473
+ <a href="#M000086" class="method-signature">
474
+ <span class="method-name">escape_chars</span><span class="method-args">(value)</span>
475
+ </a>
476
+ </div>
477
+
478
+ <div class="method-description">
479
+ <p><a class="source-toggle" href="#"
480
+ onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
481
+ <div class="method-source-code" id="M000086-source">
482
+ <pre>
483
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 161</span>
484
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_chars</span>(<span class="ruby-identifier">value</span>)
485
+ <span class="ruby-identifier">value</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\\&quot;</span>, <span class="ruby-value str">&quot;\\\\&quot;</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\n&quot;</span>, <span class="ruby-value str">&quot;\\n&quot;</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;,&quot;</span>, <span class="ruby-value str">&quot;\\,&quot;</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;;&quot;</span>, <span class="ruby-value str">&quot;\\;&quot;</span>)
486
+ <span class="ruby-keyword kw">end</span>
487
+ </pre>
488
+ </div>
489
+ </div>
490
+ </div>
491
+
492
+ <div id="method-M000090" class="method-detail">
493
+ <a name="M000090"></a>
494
+
495
+ <div class="method-heading">
496
+ <a href="#M000090" class="method-signature">
497
+ <span class="method-name">multi_property?</span><span class="method-args">(name)</span>
498
+ </a>
499
+ </div>
500
+
501
+ <div class="method-description">
502
+ <p><a class="source-toggle" href="#"
503
+ onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
504
+ <div class="method-source-code" id="M000090-source">
505
+ <pre>
506
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 202</span>
507
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multi_property?</span>(<span class="ruby-identifier">name</span>)
508
+ <span class="ruby-ivar">@@multi_properties</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">downcase</span>)
509
+ <span class="ruby-keyword kw">end</span>
510
+ </pre>
511
+ </div>
512
+ </div>
513
+ </div>
514
+
515
+ <div id="method-M000091" class="method-detail">
516
+ <a name="M000091"></a>
517
+
518
+ <div class="method-heading">
519
+ <a href="#M000091" class="method-signature">
520
+ <span class="method-name">multiline_property?</span><span class="method-args">(name)</span>
521
+ </a>
522
+ </div>
523
+
524
+ <div class="method-description">
525
+ <p><a class="source-toggle" href="#"
526
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
527
+ <div class="method-source-code" id="M000091-source">
528
+ <pre>
529
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 206</span>
530
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multiline_property?</span>(<span class="ruby-identifier">name</span>)
531
+ <span class="ruby-ivar">@@multiline_properties</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">downcase</span>)
532
+ <span class="ruby-keyword kw">end</span>
533
+ </pre>
534
+ </div>
535
+ </div>
536
+ </div>
537
+
538
+ <div id="method-M000082" class="method-detail">
539
+ <a name="M000082"></a>
540
+
541
+ <div class="method-heading">
542
+ <a href="#M000082" class="method-signature">
543
+ <span class="method-name">new_uid</span><span class="method-args">()</span>
544
+ </a>
545
+ </div>
546
+
547
+ <div class="method-description">
548
+ <p>
549
+ Used to generate unique component ids
550
+ </p>
551
+ <p><a class="source-toggle" href="#"
552
+ onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
553
+ <div class="method-source-code" id="M000082-source">
554
+ <pre>
555
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 98</span>
556
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_uid</span>
557
+ <span class="ruby-node">&quot;#{DateTime.now}_#{rand(999999999)}@#{Socket.gethostname}&quot;</span>
558
+ <span class="ruby-keyword kw">end</span>
559
+ </pre>
560
+ </div>
561
+ </div>
562
+ </div>
563
+
564
+ <div id="method-M000084" class="method-detail">
565
+ <a name="M000084"></a>
566
+
567
+ <div class="method-heading">
568
+ <a href="#M000084" class="method-signature">
569
+ <span class="method-name">print_component</span><span class="method-args">() {|+| ...}</span>
570
+ </a>
571
+ </div>
572
+
573
+ <div class="method-description">
574
+ <p>
575
+ Print this icalendar component
576
+ </p>
577
+ <p><a class="source-toggle" href="#"
578
+ onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
579
+ <div class="method-source-code" id="M000084-source">
580
+ <pre>
581
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 114</span>
582
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_component</span>
583
+ <span class="ruby-comment cmt"># Begin a new component</span>
584
+ <span class="ruby-node">&quot;BEGIN:#{@name.upcase}\r\n&quot;</span> <span class="ruby-operator">+</span>
585
+
586
+ <span class="ruby-comment cmt"># Then the properties</span>
587
+ <span class="ruby-identifier">print_properties</span> <span class="ruby-operator">+</span>
588
+
589
+ <span class="ruby-comment cmt"># sub components</span>
590
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-operator">+</span>
591
+
592
+ <span class="ruby-comment cmt"># End of this component</span>
593
+ <span class="ruby-node">&quot;END:#{@name.upcase}\r\n&quot;</span>
594
+ <span class="ruby-keyword kw">end</span>
595
+ </pre>
596
+ </div>
597
+ </div>
598
+ </div>
599
+
600
+ <div id="method-M000088" class="method-detail">
601
+ <a name="M000088"></a>
602
+
603
+ <div class="method-heading">
604
+ <a href="#M000088" class="method-signature">
605
+ <span class="method-name">print_parameters</span><span class="method-args">(val)</span>
606
+ </a>
607
+ </div>
608
+
609
+ <div class="method-description">
610
+ <p>
611
+ Print the parameters for a specific property
612
+ </p>
613
+ <p><a class="source-toggle" href="#"
614
+ onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
615
+ <div class="method-source-code" id="M000088-source">
616
+ <pre>
617
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 172</span>
618
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_parameters</span>(<span class="ruby-identifier">val</span>)
619
+ <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;&quot;</span>
620
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</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">:ical_params</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">ical_params</span>.<span class="ruby-identifier">nil?</span>
621
+
622
+ <span class="ruby-identifier">val</span>.<span class="ruby-identifier">ical_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>
623
+ <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;;#{key}&quot;</span>
624
+ <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">is_a?</span>(<span class="ruby-constant">Array</span>)
625
+
626
+ <span class="ruby-comment cmt"># Possible parameter values</span>
627
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">empty?</span>
628
+ <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;=&quot;</span>
629
+ <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>
630
+ <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>
631
+ <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>
632
+ <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>
633
+ <span class="ruby-identifier">sep</span> = <span class="ruby-value str">&quot;,&quot;</span>
634
+ <span class="ruby-keyword kw">end</span>
635
+ <span class="ruby-keyword kw">end</span>
636
+ <span class="ruby-keyword kw">end</span>
637
+ <span class="ruby-keyword kw">end</span>
638
+ <span class="ruby-identifier">s</span>
639
+ <span class="ruby-keyword kw">end</span>
640
+ </pre>
641
+ </div>
642
+ </div>
643
+ </div>
644
+
645
+ <div id="method-M000085" class="method-detail">
646
+ <a name="M000085"></a>
647
+
648
+ <div class="method-heading">
649
+ <a href="#M000085" class="method-signature">
650
+ <span class="method-name">print_properties</span><span class="method-args">()</span>
651
+ </a>
652
+ </div>
653
+
654
+ <div class="method-description">
655
+ <p>
656
+ Print this components properties
657
+ </p>
658
+ <p><a class="source-toggle" href="#"
659
+ onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
660
+ <div class="method-source-code" id="M000085-source">
661
+ <pre>
662
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 129</span>
663
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_properties</span>
664
+ <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;&quot;</span>
665
+
666
+ <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">val</span><span class="ruby-operator">|</span>
667
+ <span class="ruby-comment cmt"># Take out underscore for property names that conflicted</span>
668
+ <span class="ruby-comment cmt"># with built-in words.</span>
669
+ <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>
670
+ <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>]
671
+ <span class="ruby-keyword kw">end</span>
672
+
673
+ <span class="ruby-comment cmt"># Property name</span>
674
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">multiline_property?</span>(<span class="ruby-identifier">key</span>)
675
+ <span class="ruby-identifier">prelude</span> = <span class="ruby-node">&quot;#{key.gsub(/_/, '-').upcase}&quot;</span> <span class="ruby-operator">+</span>
676
+
677
+ <span class="ruby-comment cmt"># Possible parameters</span>
678
+ <span class="ruby-identifier">print_parameters</span>(<span class="ruby-identifier">val</span>)
679
+
680
+ <span class="ruby-comment cmt"># Property value</span>
681
+ <span class="ruby-identifier">value</span> = <span class="ruby-node">&quot;:#{val.to_ical}&quot;</span>
682
+ <span class="ruby-identifier">add_sliced_text</span>(<span class="ruby-identifier">s</span>,<span class="ruby-identifier">prelude</span><span class="ruby-operator">+</span><span class="ruby-identifier">escape_chars</span>(<span class="ruby-identifier">value</span>))
683
+ <span class="ruby-keyword kw">else</span>
684
+ <span class="ruby-identifier">prelude</span> = <span class="ruby-node">&quot;#{key.gsub(/_/, '-').upcase}&quot;</span>
685
+ <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">v</span><span class="ruby-operator">|</span>
686
+ <span class="ruby-identifier">params</span> = <span class="ruby-identifier">print_parameters</span>(<span class="ruby-identifier">v</span>)
687
+ <span class="ruby-identifier">value</span> = <span class="ruby-node">&quot;:#{v.to_ical}&quot;</span>
688
+ <span class="ruby-identifier">add_sliced_text</span>(<span class="ruby-identifier">s</span>,<span class="ruby-identifier">prelude</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">params</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">escape_chars</span>(<span class="ruby-identifier">value</span>))
689
+ <span class="ruby-keyword kw">end</span>
690
+ <span class="ruby-keyword kw">end</span>
691
+ <span class="ruby-keyword kw">end</span>
692
+ <span class="ruby-identifier">s</span>
693
+ <span class="ruby-keyword kw">end</span>
694
+ </pre>
695
+ </div>
696
+ </div>
697
+ </div>
698
+
699
+ <div id="method-M000078" class="method-detail">
700
+ <a name="M000078"></a>
701
+
702
+ <div class="method-heading">
703
+ <span class="method-name">remove</span><span class="method-args">(component)</span>
704
+ </div>
705
+
706
+ <div class="method-description">
707
+ <p>
708
+ Alias for <a href="Component.html#M000077">remove_component</a>
709
+ </p>
710
+ </div>
711
+ </div>
712
+
713
+ <div id="method-M000077" class="method-detail">
714
+ <a name="M000077"></a>
715
+
716
+ <div class="method-heading">
717
+ <a href="#M000077" class="method-signature">
718
+ <span class="method-name">remove_component</span><span class="method-args">(component)</span>
719
+ </a>
720
+ </div>
721
+
722
+ <div class="method-description">
723
+ <p><a class="source-toggle" href="#"
724
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
725
+ <div class="method-source-code" id="M000077-source">
726
+ <pre>
727
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 77</span>
728
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_component</span>(<span class="ruby-identifier">component</span>)
729
+ <span class="ruby-identifier">key</span> = (<span class="ruby-identifier">component</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'s'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'icalendar::'</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">to_sym</span>
730
+
731
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span>
732
+ <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">component</span>)
733
+ <span class="ruby-keyword kw">end</span>
734
+ <span class="ruby-keyword kw">end</span>
735
+ </pre>
736
+ </div>
737
+ </div>
738
+ </div>
739
+
740
+ <div id="method-M000079" class="method-detail">
741
+ <a name="M000079"></a>
742
+
743
+ <div class="method-heading">
744
+ <span class="method-name">remove_event</span><span class="method-args">(component)</span>
745
+ </div>
746
+
747
+ <div class="method-description">
748
+ <p>
749
+ Alias for <a href="Component.html#M000077">remove_component</a>
750
+ </p>
751
+ </div>
752
+ </div>
753
+
754
+ <div id="method-M000081" class="method-detail">
755
+ <a name="M000081"></a>
756
+
757
+ <div class="method-heading">
758
+ <span class="method-name">remove_journal</span><span class="method-args">(component)</span>
759
+ </div>
760
+
761
+ <div class="method-description">
762
+ <p>
763
+ Alias for <a href="Component.html#M000077">remove_component</a>
764
+ </p>
765
+ </div>
766
+ </div>
767
+
768
+ <div id="method-M000080" class="method-detail">
769
+ <a name="M000080"></a>
770
+
771
+ <div class="method-heading">
772
+ <span class="method-name">remove_todo</span><span class="method-args">(component)</span>
773
+ </div>
774
+
775
+ <div class="method-description">
776
+ <p>
777
+ Alias for <a href="Component.html#M000077">remove_component</a>
778
+ </p>
779
+ </div>
780
+ </div>
781
+
782
+ <div id="method-M000096" class="method-detail">
783
+ <a name="M000096"></a>
784
+
785
+ <div class="method-heading">
786
+ <a href="#M000096" class="method-signature">
787
+ <span class="method-name">respond_to?</span><span class="method-args">(method_name)</span>
788
+ </a>
789
+ </div>
790
+
791
+ <div class="method-description">
792
+ <p><a class="source-toggle" href="#"
793
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
794
+ <div class="method-source-code" id="M000096-source">
795
+ <pre>
796
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 441</span>
797
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>)
798
+ <span class="ruby-keyword kw">if</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>
799
+ <span class="ruby-keyword kw">true</span>
800
+ <span class="ruby-keyword kw">else</span>
801
+ <span class="ruby-keyword kw">super</span>
802
+ <span class="ruby-keyword kw">end</span>
803
+ <span class="ruby-keyword kw">end</span>
804
+ </pre>
805
+ </div>
806
+ </div>
807
+ </div>
808
+
809
+ <div id="method-M000083" class="method-detail">
810
+ <a name="M000083"></a>
811
+
812
+ <div class="method-heading">
813
+ <a href="#M000083" class="method-signature">
814
+ <span class="method-name">to_ical</span><span class="method-args">()</span>
815
+ </a>
816
+ </div>
817
+
818
+ <div class="method-description">
819
+ <p>
820
+ Output in the icalendar format
821
+ </p>
822
+ <p><a class="source-toggle" href="#"
823
+ onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
824
+ <div class="method-source-code" id="M000083-source">
825
+ <pre>
826
+ <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 103</span>
827
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ical</span>
828
+ <span class="ruby-identifier">print_component</span> <span class="ruby-keyword kw">do</span>
829
+ <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;&quot;</span>
830
+ <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">comps</span><span class="ruby-operator">|</span>
831
+ <span class="ruby-identifier">comps</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">component</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">component</span>.<span class="ruby-identifier">to_ical</span> }
832
+ <span class="ruby-keyword kw">end</span>
833
+ <span class="ruby-identifier">s</span>
834
+ <span class="ruby-keyword kw">end</span>
835
+ <span class="ruby-keyword kw">end</span>
836
+ </pre>
837
+ </div>
838
+ </div>
839
+ </div>
840
+
841
+
842
+ </div>
843
+
844
+
845
+ </div>
846
+
847
+
848
+ <div id="validator-badges">
849
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
850
+ </div>
851
+
852
+ </body>
853
+ </html>