icalendar 0.96.4 → 0.97

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/README +66 -53
  2. data/Rakefile +33 -24
  3. data/docs/api/classes/Array.html +9 -11
  4. data/docs/api/classes/Array.src/M000002.html +18 -0
  5. data/docs/api/classes/Date.html +2 -22
  6. data/docs/api/classes/Date.src/M000004.html +29 -0
  7. data/docs/api/classes/DateTime.html +2 -43
  8. data/docs/api/classes/DateTime.src/M000005.html +50 -0
  9. data/docs/api/classes/Fixnum.html +2 -11
  10. data/docs/api/classes/Fixnum.src/M000011.html +18 -0
  11. data/docs/api/classes/Float.html +2 -11
  12. data/docs/api/classes/Float.src/M000003.html +18 -0
  13. data/docs/api/classes/HashAttrs.html +15 -60
  14. data/docs/api/classes/HashAttrs.src/M000068.html +26 -0
  15. data/docs/api/classes/HashAttrs.src/M000069.html +27 -0
  16. data/docs/api/classes/HashAttrs.src/M000070.html +19 -0
  17. data/docs/api/classes/Icalendar/Alarm.html +5 -15
  18. data/docs/api/classes/Icalendar/Alarm.src/M000020.html +22 -0
  19. data/docs/api/classes/Icalendar/Base.html +41 -0
  20. data/docs/api/classes/Icalendar/Base.src/M000022.html +18 -0
  21. data/docs/api/classes/Icalendar/Base.src/M000023.html +18 -0
  22. data/docs/api/classes/Icalendar/Calendar.html +116 -116
  23. data/docs/api/classes/Icalendar/Calendar.src/M000054.html +23 -0
  24. data/docs/api/classes/Icalendar/Calendar.src/M000055.html +23 -0
  25. data/docs/api/classes/Icalendar/Calendar.src/M000056.html +18 -0
  26. data/docs/api/classes/Icalendar/Calendar.src/M000057.html +23 -0
  27. data/docs/api/classes/Icalendar/Calendar.src/M000058.html +18 -0
  28. data/docs/api/classes/Icalendar/Calendar.src/M000059.html +23 -0
  29. data/docs/api/classes/Icalendar/Calendar.src/M000060.html +18 -0
  30. data/docs/api/classes/Icalendar/Calendar.src/M000061.html +23 -0
  31. data/docs/api/classes/Icalendar/Calendar.src/M000062.html +18 -0
  32. data/docs/api/classes/Icalendar/Calendar.src/M000063.html +23 -0
  33. data/docs/api/classes/Icalendar/Calendar.src/M000064.html +19 -0
  34. data/docs/api/classes/Icalendar/Component.html +200 -367
  35. data/docs/api/classes/Icalendar/Component.src/M000029.html +22 -0
  36. data/docs/api/classes/Icalendar/Component.src/M000030.html +24 -0
  37. data/docs/api/classes/Icalendar/Component.src/M000035.html +22 -0
  38. data/docs/api/classes/Icalendar/Component.src/M000040.html +18 -0
  39. data/docs/api/classes/Icalendar/Component.src/M000041.html +24 -0
  40. data/docs/api/classes/Icalendar/Component.src/M000042.html +28 -0
  41. data/docs/api/classes/Icalendar/Component.src/M000043.html +37 -0
  42. data/docs/api/classes/Icalendar/Component.src/M000044.html +37 -0
  43. data/docs/api/classes/Icalendar/Component.src/M000045.html +18 -0
  44. data/docs/api/classes/Icalendar/Component.src/M000046.html +18 -0
  45. data/docs/api/classes/Icalendar/Component.src/M000047.html +18 -0
  46. data/docs/api/classes/Icalendar/Component.src/M000048.html +26 -0
  47. data/docs/api/classes/Icalendar/Component.src/M000049.html +29 -0
  48. data/docs/api/classes/Icalendar/Component.src/M000050.html +22 -0
  49. data/docs/api/classes/Icalendar/DateProp.html +2 -12
  50. data/docs/api/classes/Icalendar/DateProp.src/M000013.html +19 -0
  51. data/docs/api/classes/Icalendar/DateProp/ClassMethods.html +2 -59
  52. data/docs/api/classes/Icalendar/DateProp/ClassMethods.src/M000014.html +66 -0
  53. data/docs/api/classes/Icalendar/Daylight.html +5 -14
  54. data/docs/api/classes/Icalendar/Daylight.src/M000051.html +18 -0
  55. data/docs/api/classes/Icalendar/Event.html +30 -37
  56. data/docs/api/classes/Icalendar/Event.src/M000052.html +23 -0
  57. data/docs/api/classes/Icalendar/Event.src/M000053.html +23 -0
  58. data/docs/api/classes/Icalendar/Freebusy.html +5 -14
  59. data/docs/api/classes/Icalendar/Freebusy.src/M000065.html +21 -0
  60. data/docs/api/classes/Icalendar/Geo.html +192 -0
  61. data/docs/api/classes/Icalendar/Geo.src/M000024.html +19 -0
  62. data/docs/api/classes/Icalendar/Geo.src/M000025.html +18 -0
  63. data/docs/api/classes/Icalendar/Journal.html +2 -11
  64. data/docs/api/classes/Icalendar/Journal.src/M000016.html +22 -0
  65. data/docs/api/classes/Icalendar/Parameter.html +5 -23
  66. data/docs/api/classes/Icalendar/Parameter.src/M000066.html +27 -0
  67. data/docs/api/classes/Icalendar/Parser.html +36 -212
  68. data/docs/api/classes/Icalendar/Parser.src/M000017.html +32 -0
  69. data/docs/api/classes/Icalendar/Parser.src/M000018.html +43 -0
  70. data/docs/api/classes/Icalendar/Parser.src/M000019.html +33 -0
  71. data/docs/api/classes/Icalendar/Standard.html +2 -11
  72. data/docs/api/classes/Icalendar/Standard.src/M000015.html +18 -0
  73. data/docs/api/classes/Icalendar/Timezone.html +16 -48
  74. data/docs/api/classes/Icalendar/Timezone.src/M000026.html +19 -0
  75. data/docs/api/classes/Icalendar/Timezone.src/M000027.html +22 -0
  76. data/docs/api/classes/Icalendar/Timezone.src/M000028.html +18 -0
  77. data/docs/api/classes/Icalendar/Todo.html +5 -14
  78. data/docs/api/classes/Icalendar/Todo.src/M000021.html +22 -0
  79. data/docs/api/classes/Object.html +10 -59
  80. data/docs/api/classes/Object.src/M000006.html +20 -0
  81. data/docs/api/classes/Object.src/M000007.html +18 -0
  82. data/docs/api/classes/Object.src/M000008.html +20 -0
  83. data/docs/api/classes/Object.src/M000009.html +18 -0
  84. data/docs/api/classes/Object.src/M000010.html +18 -0
  85. data/docs/api/classes/String.html +2 -11
  86. data/docs/api/classes/String.src/M000012.html +18 -0
  87. data/docs/api/classes/Time.html +2 -26
  88. data/docs/api/classes/Time.src/M000001.html +37 -0
  89. data/docs/api/classes/URI/Generic.html +5 -14
  90. data/docs/api/classes/URI/Generic.src/M000067.html +18 -0
  91. data/docs/api/created.rid +1 -1
  92. data/docs/api/files/COPYING.html +1 -1
  93. data/docs/api/files/GPL.html +1 -1
  94. data/docs/api/files/README.html +76 -64
  95. data/docs/api/files/lib/hash_attrs_rb.html +1 -1
  96. data/docs/api/files/lib/icalendar/base_rb.html +1 -1
  97. data/docs/api/files/lib/icalendar/calendar_rb.html +1 -1
  98. data/docs/api/files/lib/icalendar/component/alarm_rb.html +1 -1
  99. data/docs/api/files/lib/icalendar/component/event_rb.html +1 -1
  100. data/docs/api/files/lib/icalendar/component/freebusy_rb.html +1 -1
  101. data/docs/api/files/lib/icalendar/component/journal_rb.html +1 -1
  102. data/docs/api/files/lib/icalendar/component/timezone_rb.html +1 -1
  103. data/docs/api/files/lib/icalendar/component/todo_rb.html +1 -1
  104. data/docs/api/files/lib/icalendar/component_rb.html +8 -1
  105. data/docs/api/files/lib/icalendar/conversions_rb.html +1 -1
  106. data/docs/api/files/lib/icalendar/helpers_rb.html +1 -1
  107. data/docs/api/files/lib/icalendar/parameter_rb.html +1 -1
  108. data/docs/api/files/lib/icalendar/parser_rb.html +2 -1
  109. data/docs/api/files/lib/icalendar_rb.html +1 -1
  110. data/docs/api/files/lib/meta_rb.html +1 -1
  111. data/docs/api/fr_class_index.html +1 -0
  112. data/docs/api/fr_method_index.html +57 -41
  113. data/docs/rfcs/itip_notes.txt +69 -0
  114. data/examples/create_cal.rb +33 -32
  115. data/examples/parse_cal.rb +2 -2
  116. data/lib/icalendar/base.rb +8 -0
  117. data/lib/icalendar/calendar.rb +32 -3
  118. data/lib/icalendar/component.rb +187 -113
  119. data/lib/icalendar/component/alarm.rb +3 -0
  120. data/lib/icalendar/component/event.rb +9 -3
  121. data/lib/icalendar/component/freebusy.rb +3 -0
  122. data/lib/icalendar/component/journal.rb +4 -0
  123. data/lib/icalendar/component/todo.rb +4 -0
  124. data/lib/icalendar/conversions.rb +7 -1
  125. data/lib/icalendar/parser.rb +68 -90
  126. data/test/calendar_test.rb +32 -8
  127. data/test/component/event_test.rb +4 -7
  128. data/test/component/todo_test.rb +13 -0
  129. data/test/component_test.rb +21 -34
  130. data/test/conversions_test.rb +66 -0
  131. data/test/coverage/-home-rosejn-projects-icalendar-lib-hash_attrs_rb.html +574 -0
  132. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-base_rb.html +575 -0
  133. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-calendar_rb.html +629 -0
  134. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-alarm_rb.html +581 -0
  135. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-event_rb.html +658 -0
  136. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-freebusy_rb.html +574 -0
  137. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-journal_rb.html +597 -0
  138. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-timezone_rb.html +625 -0
  139. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component-todo_rb.html +600 -0
  140. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-component_rb.html +924 -0
  141. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-conversions_rb.html +667 -0
  142. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar-parser_rb.html +938 -0
  143. data/test/coverage/-home-rosejn-projects-icalendar-lib-icalendar_rb.html +576 -0
  144. data/test/coverage/-home-rosejn-projects-icalendar-lib-meta_rb.html +572 -0
  145. data/test/coverage/calendar_test_rb.html +590 -0
  146. data/test/coverage/component_test_rb.html +602 -0
  147. data/test/coverage/index.html +1009 -0
  148. data/test/coverage/lib-hash_attrs_rb.html +574 -0
  149. data/test/coverage/lib-icalendar-base_rb.html +583 -0
  150. data/test/coverage/lib-icalendar-calendar_rb.html +631 -0
  151. data/test/coverage/lib-icalendar-component-alarm_rb.html +581 -0
  152. data/test/coverage/lib-icalendar-component-event_rb.html +661 -0
  153. data/test/coverage/lib-icalendar-component-freebusy_rb.html +576 -0
  154. data/test/coverage/lib-icalendar-component-journal_rb.html +599 -0
  155. data/test/coverage/lib-icalendar-component-timezone_rb.html +625 -0
  156. data/test/coverage/lib-icalendar-component-todo_rb.html +602 -0
  157. data/test/coverage/lib-icalendar-component_rb.html +941 -0
  158. data/test/coverage/lib-icalendar-conversions_rb.html +673 -0
  159. data/test/coverage/lib-icalendar-parser_rb.html +916 -0
  160. data/test/coverage/lib-icalendar_rb.html +576 -0
  161. data/test/coverage/lib-meta_rb.html +572 -0
  162. data/test/coverage/parameter_test_rb.html +569 -0
  163. data/test/coverage/parser_test_rb.html +623 -0
  164. data/test/coverage/test-calendar_test_rb.html +590 -0
  165. data/test/coverage/test-component-event_test_rb.html +584 -0
  166. data/test/coverage/test-component_test_rb.html +606 -0
  167. data/test/coverage/test-conversions_test_rb.html +603 -0
  168. data/test/coverage/test-parameter_test_rb.html +569 -0
  169. data/test/coverage/test-parser_test_rb.html +624 -0
  170. data/test/interactive.rb +3 -1
  171. data/test/life.ics +46 -1092
  172. data/test/parameter_test.rb +11 -2
  173. data/test/parser_test.rb +12 -11
  174. metadata +259 -126
  175. data/test/old_life.ics +0 -46
  176. data/test/rw.ics +0 -947
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>new (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 19</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
15
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">&quot;VCALENDAR&quot;</span>)
16
+
17
+ <span class="ruby-comment cmt"># Set some defaults</span>
18
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">calscale</span> = <span class="ruby-value str">&quot;GREGORIAN&quot;</span> <span class="ruby-comment cmt"># Who knows, but this is the only one in the spec.</span>
19
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">prodid</span> = <span class="ruby-value str">&quot;iCalendar-Ruby&quot;</span> <span class="ruby-comment cmt"># Current product... Should be overwritten by apps that use the library</span>
20
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span> = <span class="ruby-value str">&quot;2.0&quot;</span> <span class="ruby-comment cmt"># Version of the specification</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>event (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 28</span>
14
+ <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>)
15
+ <span class="ruby-identifier">e</span> = <span class="ruby-constant">Event</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_component</span> <span class="ruby-identifier">e</span>
17
+
18
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
19
+
20
+ <span class="ruby-identifier">e</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>find_event (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 37</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_event</span>(<span class="ruby-identifier">uid</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">events</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">uid</span>}
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>todo (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 41</span>
14
+ <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>)
15
+ <span class="ruby-identifier">e</span> = <span class="ruby-constant">Todo</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_component</span> <span class="ruby-identifier">e</span>
17
+
18
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
19
+
20
+ <span class="ruby-identifier">e</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>find_todo (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 50</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_todo</span>(<span class="ruby-identifier">uid</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">todos</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">uid</span>}
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>journal (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 54</span>
14
+ <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>)
15
+ <span class="ruby-identifier">e</span> = <span class="ruby-constant">Journal</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_component</span> <span class="ruby-identifier">e</span>
17
+
18
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
19
+
20
+ <span class="ruby-identifier">e</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>find_journal (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 63</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_journal</span>(<span class="ruby-identifier">uid</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">journals</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">j</span><span class="ruby-operator">|</span> <span class="ruby-identifier">j</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">uid</span>}
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>freebusy (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 67</span>
14
+ <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>)
15
+ <span class="ruby-identifier">e</span> = <span class="ruby-constant">Freebusy</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_component</span> <span class="ruby-identifier">e</span>
17
+
18
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
19
+
20
+ <span class="ruby-identifier">e</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>find_freebusy (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 76</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_freebusy</span>(<span class="ruby-identifier">uid</span>)
15
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">freebusys</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">uid</span>}
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>timezone (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 80</span>
14
+ <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>)
15
+ <span class="ruby-identifier">e</span> = <span class="ruby-constant">Timezone</span>.<span class="ruby-identifier">new</span>
16
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_component</span> <span class="ruby-identifier">e</span>
17
+
18
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
19
+
20
+ <span class="ruby-identifier">e</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,19 @@
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>
7
+ <head>
8
+ <title>publish (Icalendar::Calendar)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 98</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">publish</span>
15
+ <span class="ruby-identifier">ip_method</span> = <span class="ruby-value str">&quot;PUBLISH&quot;</span>
16
+
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -102,20 +102,28 @@ 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="#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;
105
+ <a href="#M000031">add</a>&nbsp;&nbsp;
106
+ <a href="#M000030">add_component</a>&nbsp;&nbsp;
107
+ <a href="#M000032">add_event</a>&nbsp;&nbsp;
108
+ <a href="#M000034">add_journal</a>&nbsp;&nbsp;
109
+ <a href="#M000033">add_todo</a>&nbsp;&nbsp;
110
+ <a href="#M000045">custom_property</a>&nbsp;&nbsp;
111
+ <a href="#M000047">ical_component</a>&nbsp;&nbsp;
112
+ <a href="#M000049">ical_multi_property</a>&nbsp;&nbsp;
113
+ <a href="#M000048">ical_property</a>&nbsp;&nbsp;
114
+ <a href="#M000046">multi_property?</a>&nbsp;&nbsp;
115
+ <a href="#M000029">new</a>&nbsp;&nbsp;
116
+ <a href="#M000040">new_uid</a>&nbsp;&nbsp;
117
+ <a href="#M000042">print_component</a>&nbsp;&nbsp;
118
+ <a href="#M000044">print_parameters</a>&nbsp;&nbsp;
119
+ <a href="#M000043">print_properties</a>&nbsp;&nbsp;
120
+ <a href="#M000036">remove</a>&nbsp;&nbsp;
121
+ <a href="#M000035">remove_component</a>&nbsp;&nbsp;
122
+ <a href="#M000037">remove_event</a>&nbsp;&nbsp;
123
+ <a href="#M000039">remove_journal</a>&nbsp;&nbsp;
124
+ <a href="#M000038">remove_todo</a>&nbsp;&nbsp;
125
+ <a href="#M000050">respond_to?</a>&nbsp;&nbsp;
126
+ <a href="#M000041">to_ical</a>&nbsp;&nbsp;
119
127
  </div>
120
128
  </div>
121
129
 
@@ -145,11 +153,6 @@ an <a href="Alarm.html">Alarm</a>.
145
153
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
146
154
  <td class="context-item-desc"></td>
147
155
  </tr>
148
- <tr class="top-aligned-row context-row">
149
- <td class="context-item-name">property_params</td>
150
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
151
- <td class="context-item-desc"></td>
152
- </tr>
153
156
  </table>
154
157
  </div>
155
158
  </div>
@@ -160,41 +163,28 @@ an <a href="Alarm.html">Alarm</a>.
160
163
  <div id="methods">
161
164
  <h3 class="section-bar">Public Class methods</h3>
162
165
 
163
- <div id="method-M000026" class="method-detail">
164
- <a name="M000026"></a>
166
+ <div id="method-M000029" class="method-detail">
167
+ <a name="M000029"></a>
165
168
 
166
169
  <div class="method-heading">
167
- <a href="#M000026" class="method-signature">
170
+ <a href="Component.src/M000029.html" target="Code" class="method-signature"
171
+ onclick="popupCode('Component.src/M000029.html');return false;">
168
172
  <span class="method-name">new</span><span class="method-args">(name)</span>
169
173
  </a>
170
174
  </div>
171
175
 
172
176
  <div class="method-description">
173
- <p><a class="source-toggle" href="#"
174
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
175
- <div class="method-source-code" id="M000026-source">
176
- <pre>
177
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 26</span>
178
- 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
179
- 27: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
180
- 28: <span class="ruby-ivar">@components</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>([])
181
- 29: <span class="ruby-ivar">@properties</span> = {}
182
- 30: <span class="ruby-ivar">@property_params</span> = {}
183
- 31:
184
- 32: <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>)
185
- 33: <span class="ruby-keyword kw">end</span>
186
- </pre>
187
- </div>
188
177
  </div>
189
178
  </div>
190
179
 
191
180
  <h3 class="section-bar">Protected Class methods</h3>
192
181
 
193
- <div id="method-M000035" class="method-detail">
194
- <a name="M000035"></a>
182
+ <div id="method-M000047" class="method-detail">
183
+ <a name="M000047"></a>
195
184
 
196
185
  <div class="method-heading">
197
- <a href="#M000035" class="method-signature">
186
+ <a href="Component.src/M000047.html" target="Code" class="method-signature"
187
+ onclick="popupCode('Component.src/M000047.html');return false;">
198
188
  <span class="method-name">ical_component</span><span class="method-args">(*syms)</span>
199
189
  </a>
200
190
  </div>
@@ -203,24 +193,15 @@ an <a href="Alarm.html">Alarm</a>.
203
193
  <p>
204
194
  Make it protected so we can monitor usage&#8230;
205
195
  </p>
206
- <p><a class="source-toggle" href="#"
207
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
208
- <div class="method-source-code" id="M000035-source">
209
- <pre>
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
- </pre>
215
- </div>
216
196
  </div>
217
197
  </div>
218
198
 
219
- <div id="method-M000037" class="method-detail">
220
- <a name="M000037"></a>
199
+ <div id="method-M000049" class="method-detail">
200
+ <a name="M000049"></a>
221
201
 
222
202
  <div class="method-heading">
223
- <a href="#M000037" class="method-signature">
203
+ <a href="Component.src/M000049.html" target="Code" class="method-signature"
204
+ onclick="popupCode('Component.src/M000049.html');return false;">
224
205
  <span class="method-name">ical_multi_property</span><span class="method-args">(property, singular, plural)</span>
225
206
  </a>
226
207
  </div>
@@ -230,74 +211,15 @@ Make it protected so we can monitor usage&#8230;
230
211
  Define a set of methods defining a new property, which supports multiple
231
212
  values for the same property name.
232
213
  </p>
233
- <p><a class="source-toggle" href="#"
234
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
235
- <div class="method-source-code" id="M000037-source">
236
- <pre>
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
- </pre>
292
- </div>
293
214
  </div>
294
215
  </div>
295
216
 
296
- <div id="method-M000036" class="method-detail">
297
- <a name="M000036"></a>
217
+ <div id="method-M000048" class="method-detail">
218
+ <a name="M000048"></a>
298
219
 
299
220
  <div class="method-heading">
300
- <a href="#M000036" class="method-signature">
221
+ <a href="Component.src/M000048.html" target="Code" class="method-signature"
222
+ onclick="popupCode('Component.src/M000048.html');return false;">
301
223
  <span class="method-name">ical_property</span><span class="method-args">(property, alias_name = nil, prop_name = nil)</span>
302
224
  </a>
303
225
  </div>
@@ -306,60 +228,13 @@ values for the same property name.
306
228
  <p>
307
229
  Define a set of methods supporting a new property
308
230
  </p>
309
- <p><a class="source-toggle" href="#"
310
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
311
- <div class="method-source-code" id="M000036-source">
312
- <pre>
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
- </pre>
355
- </div>
356
231
  </div>
357
232
  </div>
358
233
 
359
234
  <h3 class="section-bar">Public Instance methods</h3>
360
235
 
361
- <div id="method-M000028" class="method-detail">
362
- <a name="M000028"></a>
236
+ <div id="method-M000031" class="method-detail">
237
+ <a name="M000031"></a>
363
238
 
364
239
  <div class="method-heading">
365
240
  <span class="method-name">add</span><span class="method-args">(component)</span>
@@ -367,16 +242,17 @@ Define a set of methods supporting a new property
367
242
 
368
243
  <div class="method-description">
369
244
  <p>
370
- Alias for <a href="Component.html#M000027">add_component</a>
245
+ Alias for <a href="Component.html#M000030">add_component</a>
371
246
  </p>
372
247
  </div>
373
248
  </div>
374
249
 
375
- <div id="method-M000027" class="method-detail">
376
- <a name="M000027"></a>
250
+ <div id="method-M000030" class="method-detail">
251
+ <a name="M000030"></a>
377
252
 
378
253
  <div class="method-heading">
379
- <a href="#M000027" class="method-signature">
254
+ <a href="Component.src/M000030.html" target="Code" class="method-signature"
255
+ onclick="popupCode('Component.src/M000030.html');return false;">
380
256
  <span class="method-name">add_component</span><span class="method-args">(component)</span>
381
257
  </a>
382
258
  </div>
@@ -385,22 +261,34 @@ Alias for <a href="Component.html#M000027">add_component</a>
385
261
  <p>
386
262
  Add a sub-component to the current component object.
387
263
  </p>
388
- <p><a class="source-toggle" href="#"
389
- onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
390
- <div class="method-source-code" id="M000027-source">
391
- <pre>
392
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 36</span>
393
- 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_component</span>(<span class="ruby-identifier">component</span>)
394
- 37: <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>
395
- 38:
396
- 39: <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>
397
- 40: <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>] = []
398
- 41: <span class="ruby-keyword kw">end</span>
399
- 42:
400
- 43: <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>
401
- 44: <span class="ruby-keyword kw">end</span>
402
- </pre>
403
- </div>
264
+ </div>
265
+ </div>
266
+
267
+ <div id="method-M000032" class="method-detail">
268
+ <a name="M000032"></a>
269
+
270
+ <div class="method-heading">
271
+ <span class="method-name">add_event</span><span class="method-args">(component)</span>
272
+ </div>
273
+
274
+ <div class="method-description">
275
+ <p>
276
+ Alias for <a href="Component.html#M000030">add_component</a>
277
+ </p>
278
+ </div>
279
+ </div>
280
+
281
+ <div id="method-M000034" class="method-detail">
282
+ <a name="M000034"></a>
283
+
284
+ <div class="method-heading">
285
+ <span class="method-name">add_journal</span><span class="method-args">(component)</span>
286
+ </div>
287
+
288
+ <div class="method-description">
289
+ <p>
290
+ Alias for <a href="Component.html#M000030">add_component</a>
291
+ </p>
404
292
  </div>
405
293
  </div>
406
294
 
@@ -408,57 +296,73 @@ Add a sub-component to the current component object.
408
296
  <a name="M000033"></a>
409
297
 
410
298
  <div class="method-heading">
411
- <a href="#M000033" class="method-signature">
299
+ <span class="method-name">add_todo</span><span class="method-args">(component)</span>
300
+ </div>
301
+
302
+ <div class="method-description">
303
+ <p>
304
+ Alias for <a href="Component.html#M000030">add_component</a>
305
+ </p>
306
+ </div>
307
+ </div>
308
+
309
+ <div id="method-M000045" class="method-detail">
310
+ <a name="M000045"></a>
311
+
312
+ <div class="method-heading">
313
+ <a href="Component.src/M000045.html" target="Code" class="method-signature"
314
+ onclick="popupCode('Component.src/M000045.html');return false;">
412
315
  <span class="method-name">custom_property</span><span class="method-args">(name, value)</span>
413
316
  </a>
414
317
  </div>
415
318
 
416
319
  <div class="method-description">
417
320
  <p>
418
- TODO: Look into the x-property, x-param stuff&#8230;
321
+ TODO: Look into the x-property, x-param stuff&#8230; This would really only
322
+ be needed for subclassing to add additional properties to an application
323
+ using the API.
419
324
  </p>
420
- <p><a class="source-toggle" href="#"
421
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
422
- <div class="method-source-code" id="M000033-source">
423
- <pre>
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
- </pre>
429
- </div>
430
325
  </div>
431
326
  </div>
432
327
 
433
- <div id="method-M000034" class="method-detail">
434
- <a name="M000034"></a>
328
+ <div id="method-M000046" class="method-detail">
329
+ <a name="M000046"></a>
435
330
 
436
331
  <div class="method-heading">
437
- <a href="#M000034" class="method-signature">
332
+ <a href="Component.src/M000046.html" target="Code" class="method-signature"
333
+ onclick="popupCode('Component.src/M000046.html');return false;">
438
334
  <span class="method-name">multi_property?</span><span class="method-args">(name)</span>
439
335
  </a>
440
336
  </div>
441
337
 
442
338
  <div class="method-description">
443
- <p><a class="source-toggle" href="#"
444
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
445
- <div class="method-source-code" id="M000034-source">
446
- <pre>
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
- </pre>
452
- </div>
453
339
  </div>
454
340
  </div>
455
341
 
456
- <div id="method-M000030" class="method-detail">
457
- <a name="M000030"></a>
342
+ <div id="method-M000040" class="method-detail">
343
+ <a name="M000040"></a>
344
+
345
+ <div class="method-heading">
346
+ <a href="Component.src/M000040.html" target="Code" class="method-signature"
347
+ onclick="popupCode('Component.src/M000040.html');return false;">
348
+ <span class="method-name">new_uid</span><span class="method-args">()</span>
349
+ </a>
350
+ </div>
351
+
352
+ <div class="method-description">
353
+ <p>
354
+ Used to generate unique component ids
355
+ </p>
356
+ </div>
357
+ </div>
358
+
359
+ <div id="method-M000042" class="method-detail">
360
+ <a name="M000042"></a>
458
361
 
459
362
  <div class="method-heading">
460
- <a href="#M000030" class="method-signature">
461
- <span class="method-name">print_component</span><span class="method-args">() {|s| ...}</span>
363
+ <a href="Component.src/M000042.html" target="Code" class="method-signature"
364
+ onclick="popupCode('Component.src/M000042.html');return false;">
365
+ <span class="method-name">print_component</span><span class="method-args">() {|+| ...}</span>
462
366
  </a>
463
367
  </div>
464
368
 
@@ -466,37 +370,16 @@ TODO: Look into the x-property, x-param stuff&#8230;
466
370
  <p>
467
371
  Print this icalendar component
468
372
  </p>
469
- <p><a class="source-toggle" href="#"
470
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
471
- <div class="method-source-code" id="M000030-source">
472
- <pre>
473
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 57</span>
474
- 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_component</span>
475
- 58: <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;&quot;</span>
476
- 59:
477
- 60: <span class="ruby-comment cmt"># Begin a new component</span>
478
- 61: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;BEGIN:#{@name.upcase}\r\n&quot;</span>
479
- 62:
480
- 63: <span class="ruby-comment cmt"># Then the properties</span>
481
- 64: <span class="ruby-identifier">print_properties</span>(<span class="ruby-identifier">s</span>)
482
- 65:
483
- 66: <span class="ruby-comment cmt"># Any custom body of the derived component</span>
484
- 67: <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">s</span>)
485
- 68:
486
- 69: <span class="ruby-comment cmt"># End of this component</span>
487
- 70: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;END:#{@name.upcase}\r\n&quot;</span>
488
- 71: <span class="ruby-keyword kw">end</span>
489
- </pre>
490
- </div>
491
373
  </div>
492
374
  </div>
493
375
 
494
- <div id="method-M000032" class="method-detail">
495
- <a name="M000032"></a>
376
+ <div id="method-M000044" class="method-detail">
377
+ <a name="M000044"></a>
496
378
 
497
379
  <div class="method-heading">
498
- <a href="#M000032" class="method-signature">
499
- <span class="method-name">print_parameter</span><span class="method-args">(s, key, value)</span>
380
+ <a href="Component.src/M000044.html" target="Code" class="method-signature"
381
+ onclick="popupCode('Component.src/M000044.html');return false;">
382
+ <span class="method-name">print_parameters</span><span class="method-args">(val)</span>
500
383
  </a>
501
384
  </div>
502
385
 
@@ -504,44 +387,16 @@ Print this icalendar component
504
387
  <p>
505
388
  Print the parameters for a specific property
506
389
  </p>
507
- <p><a class="source-toggle" href="#"
508
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
509
- <div class="method-source-code" id="M000032-source">
510
- <pre>
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
- </pre>
535
- </div>
536
390
  </div>
537
391
  </div>
538
392
 
539
- <div id="method-M000031" class="method-detail">
540
- <a name="M000031"></a>
393
+ <div id="method-M000043" class="method-detail">
394
+ <a name="M000043"></a>
541
395
 
542
396
  <div class="method-heading">
543
- <a href="#M000031" class="method-signature">
544
- <span class="method-name">print_properties</span><span class="method-args">(s)</span>
397
+ <a href="Component.src/M000043.html" target="Code" class="method-signature"
398
+ onclick="popupCode('Component.src/M000043.html');return false;">
399
+ <span class="method-name">print_properties</span><span class="method-args">()</span>
545
400
  </a>
546
401
  </div>
547
402
 
@@ -549,129 +404,107 @@ Print the parameters for a specific property
549
404
  <p>
550
405
  Print this components properties
551
406
  </p>
552
- <p><a class="source-toggle" href="#"
553
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
554
- <div class="method-source-code" id="M000031-source">
555
- <pre>
556
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 74</span>
557
- 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_properties</span>(<span class="ruby-identifier">s</span>)
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:
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>
576
- </pre>
577
- </div>
578
407
  </div>
579
408
  </div>
580
409
 
581
- <div id="method-M000039" class="method-detail">
582
- <a name="M000039"></a>
410
+ <div id="method-M000036" class="method-detail">
411
+ <a name="M000036"></a>
583
412
 
584
413
  <div class="method-heading">
585
- <a href="#M000039" class="method-signature">
586
- <span class="method-name">respond_to?</span><span class="method-args">(method_name)</span>
587
- </a>
414
+ <span class="method-name">remove</span><span class="method-args">(component)</span>
588
415
  </div>
589
416
 
590
417
  <div class="method-description">
591
- <p><a class="source-toggle" href="#"
592
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
593
- <div class="method-source-code" id="M000039-source">
594
- <pre>
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>
603
- </pre>
604
- </div>
418
+ <p>
419
+ Alias for <a href="Component.html#M000035">remove_component</a>
420
+ </p>
605
421
  </div>
606
422
  </div>
607
423
 
608
- <div id="method-M000029" class="method-detail">
609
- <a name="M000029"></a>
424
+ <div id="method-M000035" class="method-detail">
425
+ <a name="M000035"></a>
610
426
 
611
427
  <div class="method-heading">
612
- <a href="#M000029" class="method-signature">
613
- <span class="method-name">to_ical</span><span class="method-args">()</span>
428
+ <a href="Component.src/M000035.html" target="Code" class="method-signature"
429
+ onclick="popupCode('Component.src/M000035.html');return false;">
430
+ <span class="method-name">remove_component</span><span class="method-args">(component)</span>
614
431
  </a>
615
432
  </div>
616
433
 
617
434
  <div class="method-description">
618
- <p><a class="source-toggle" href="#"
619
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
620
- <div class="method-source-code" id="M000029-source">
621
- <pre>
622
- <span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 48</span>
623
- 48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ical</span>
624
- 49: <span class="ruby-identifier">print_component</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
625
- 50: <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>
626
- 51: <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> }
627
- 52: <span class="ruby-keyword kw">end</span>
628
- 53: <span class="ruby-keyword kw">end</span>
629
- 54: <span class="ruby-keyword kw">end</span>
630
- </pre>
631
- </div>
632
435
  </div>
633
436
  </div>
634
437
 
635
- <h3 class="section-bar">Protected Instance methods</h3>
438
+ <div id="method-M000037" class="method-detail">
439
+ <a name="M000037"></a>
440
+
441
+ <div class="method-heading">
442
+ <span class="method-name">remove_event</span><span class="method-args">(component)</span>
443
+ </div>
444
+
445
+ <div class="method-description">
446
+ <p>
447
+ Alias for <a href="Component.html#M000035">remove_component</a>
448
+ </p>
449
+ </div>
450
+ </div>
451
+
452
+ <div id="method-M000039" class="method-detail">
453
+ <a name="M000039"></a>
454
+
455
+ <div class="method-heading">
456
+ <span class="method-name">remove_journal</span><span class="method-args">(component)</span>
457
+ </div>
458
+
459
+ <div class="method-description">
460
+ <p>
461
+ Alias for <a href="Component.html#M000035">remove_component</a>
462
+ </p>
463
+ </div>
464
+ </div>
636
465
 
637
466
  <div id="method-M000038" class="method-detail">
638
467
  <a name="M000038"></a>
639
468
 
640
469
  <div class="method-heading">
641
- <a href="#M000038" class="method-signature">
642
- <span class="method-name">method_missing</span><span class="method-args">(method_name, *args)</span>
470
+ <span class="method-name">remove_todo</span><span class="method-args">(component)</span>
471
+ </div>
472
+
473
+ <div class="method-description">
474
+ <p>
475
+ Alias for <a href="Component.html#M000035">remove_component</a>
476
+ </p>
477
+ </div>
478
+ </div>
479
+
480
+ <div id="method-M000050" class="method-detail">
481
+ <a name="M000050"></a>
482
+
483
+ <div class="method-heading">
484
+ <a href="Component.src/M000050.html" target="Code" class="method-signature"
485
+ onclick="popupCode('Component.src/M000050.html');return false;">
486
+ <span class="method-name">respond_to?</span><span class="method-args">(method_name)</span>
487
+ </a>
488
+ </div>
489
+
490
+ <div class="method-description">
491
+ </div>
492
+ </div>
493
+
494
+ <div id="method-M000041" class="method-detail">
495
+ <a name="M000041"></a>
496
+
497
+ <div class="method-heading">
498
+ <a href="Component.src/M000041.html" target="Code" class="method-signature"
499
+ onclick="popupCode('Component.src/M000041.html');return false;">
500
+ <span class="method-name">to_ical</span><span class="method-args">()</span>
643
501
  </a>
644
502
  </div>
645
503
 
646
504
  <div class="method-description">
647
- <p><a class="source-toggle" href="#"
648
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
649
- <div class="method-source-code" id="M000038-source">
650
- <pre>
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>
673
- </pre>
674
- </div>
505
+ <p>
506
+ Output in the icalendar format
507
+ </p>
675
508
  </div>
676
509
  </div>
677
510