icalendar 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/History.txt +3 -0
  2. data/Manifest.txt +61 -0
  3. data/PostInstall.txt +5 -0
  4. data/{README → README.rdoc} +4 -0
  5. data/Rakefile +28 -133
  6. data/config/website.yml +2 -0
  7. data/icalendar.gemspec +55 -0
  8. data/lib/icalendar/base.rb +2 -0
  9. data/lib/icalendar/component.rb +9 -7
  10. data/script/console +10 -0
  11. data/script/destroy +14 -0
  12. data/script/generate +14 -0
  13. data/script/recur1.ics +38 -0
  14. data/script/tryit.rb +13 -0
  15. data/script/txt2html +71 -0
  16. data/test.ical +33 -0
  17. data/test.ics +33 -0
  18. data/test.rb +48 -0
  19. data/test/component/{event_test.rb → test_event.rb} +0 -0
  20. data/test/component/{timezone_test.rb → test_timezone.rb} +1 -1
  21. data/test/component/{todo_test.rb → test_todo.rb} +0 -0
  22. data/test/fixtures/folding.ics +7 -7
  23. data/test/{calendar_test.rb → test_calendar.rb} +1 -4
  24. data/test/{component_test.rb → test_component.rb} +0 -0
  25. data/test/{conversions_test.rb → test_conversions.rb} +8 -8
  26. data/test/test_helper.rb +3 -0
  27. data/test/{parameter_test.rb → test_parameter.rb} +4 -0
  28. data/test/{parser_test.rb → test_parser.rb} +0 -0
  29. data/test2.rb +28 -0
  30. data/website/index.html +11 -0
  31. data/website/index.txt +79 -0
  32. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  33. data/website/stylesheets/screen.css +159 -0
  34. data/website/template.html.erb +50 -0
  35. metadata +135 -135
  36. data/docs/api/classes/Array.html +0 -155
  37. data/docs/api/classes/Bignum.html +0 -148
  38. data/docs/api/classes/Date.html +0 -172
  39. data/docs/api/classes/DateTime.html +0 -200
  40. data/docs/api/classes/Fixnum.html +0 -148
  41. data/docs/api/classes/Float.html +0 -148
  42. data/docs/api/classes/HashAttrs.html +0 -212
  43. data/docs/api/classes/Icalendar/Alarm.html +0 -228
  44. data/docs/api/classes/Icalendar/Base.html +0 -179
  45. data/docs/api/classes/Icalendar/Calendar.html +0 -504
  46. data/docs/api/classes/Icalendar/Component.html +0 -853
  47. data/docs/api/classes/Icalendar/DateProp.html +0 -187
  48. data/docs/api/classes/Icalendar/DateProp/ClassMethods.html +0 -195
  49. data/docs/api/classes/Icalendar/Daylight.html +0 -156
  50. data/docs/api/classes/Icalendar/Event.html +0 -671
  51. data/docs/api/classes/Icalendar/Freebusy.html +0 -266
  52. data/docs/api/classes/Icalendar/Geo.html +0 -211
  53. data/docs/api/classes/Icalendar/InvalidPropertyValue.html +0 -117
  54. data/docs/api/classes/Icalendar/Journal.html +0 -443
  55. data/docs/api/classes/Icalendar/Parameter.html +0 -166
  56. data/docs/api/classes/Icalendar/Parser.html +0 -352
  57. data/docs/api/classes/Icalendar/RRule.html +0 -428
  58. data/docs/api/classes/Icalendar/RRule/Weekday.html +0 -199
  59. data/docs/api/classes/Icalendar/Standard.html +0 -156
  60. data/docs/api/classes/Icalendar/Timezone.html +0 -450
  61. data/docs/api/classes/Icalendar/Todo.html +0 -480
  62. data/docs/api/classes/Icalendar/TzidSupport.html +0 -118
  63. data/docs/api/classes/Icalendar/UnknownComponentClass.html +0 -117
  64. data/docs/api/classes/Icalendar/UnknownPropertyMethod.html +0 -117
  65. data/docs/api/classes/Object.html +0 -272
  66. data/docs/api/classes/String.html +0 -148
  67. data/docs/api/classes/TZInfo.html +0 -119
  68. data/docs/api/classes/TZInfo/Timezone.html +0 -153
  69. data/docs/api/classes/TZInfo/TimezonePeriod.html +0 -200
  70. data/docs/api/classes/TZInfo/TimezoneTransitionInfo.html +0 -229
  71. data/docs/api/classes/Time.html +0 -180
  72. data/docs/api/classes/URI.html +0 -111
  73. data/docs/api/classes/URI/Generic.html +0 -148
  74. data/docs/api/created.rid +0 -1
  75. data/docs/api/files/COPYING.html +0 -163
  76. data/docs/api/files/GPL.html +0 -531
  77. data/docs/api/files/README.html +0 -401
  78. data/docs/api/files/lib/hash_attrs_rb.html +0 -107
  79. data/docs/api/files/lib/icalendar/base_rb.html +0 -108
  80. data/docs/api/files/lib/icalendar/calendar_rb.html +0 -101
  81. data/docs/api/files/lib/icalendar/component/alarm_rb.html +0 -101
  82. data/docs/api/files/lib/icalendar/component/event_rb.html +0 -101
  83. data/docs/api/files/lib/icalendar/component/freebusy_rb.html +0 -101
  84. data/docs/api/files/lib/icalendar/component/journal_rb.html +0 -101
  85. data/docs/api/files/lib/icalendar/component/timezone_rb.html +0 -101
  86. data/docs/api/files/lib/icalendar/component/todo_rb.html +0 -101
  87. data/docs/api/files/lib/icalendar/component_rb.html +0 -108
  88. data/docs/api/files/lib/icalendar/conversions_rb.html +0 -109
  89. data/docs/api/files/lib/icalendar/helpers_rb.html +0 -101
  90. data/docs/api/files/lib/icalendar/parameter_rb.html +0 -101
  91. data/docs/api/files/lib/icalendar/parser_rb.html +0 -110
  92. data/docs/api/files/lib/icalendar/rrule_rb.html +0 -110
  93. data/docs/api/files/lib/icalendar/tzinfo_rb.html +0 -101
  94. data/docs/api/files/lib/icalendar_rb.html +0 -121
  95. data/docs/api/files/lib/meta_rb.html +0 -107
  96. data/docs/api/fr_class_index.html +0 -64
  97. data/docs/api/fr_file_index.html +0 -47
  98. data/docs/api/fr_method_index.html +0 -123
  99. data/docs/api/index.html +0 -24
  100. data/docs/api/rdoc-style.css +0 -208
  101. data/docs/rfcs/itip_notes.txt +0 -69
  102. data/docs/rfcs/rfc2425.pdf +0 -0
  103. data/docs/rfcs/rfc2426.pdf +0 -0
  104. data/docs/rfcs/rfc2445.pdf +0 -0
  105. data/docs/rfcs/rfc2446.pdf +0 -0
  106. data/docs/rfcs/rfc2447.pdf +0 -0
  107. data/docs/rfcs/rfc3283.txt +0 -738
  108. data/test/coverage/STUB +0 -0
  109. data/test/coverage/index.html +0 -272
  110. data/test/coverage/lib-hash_attrs_rb.html +0 -235
  111. data/test/coverage/lib-icalendar-base_rb.html +0 -249
  112. data/test/coverage/lib-icalendar-calendar_rb.html +0 -324
  113. data/test/coverage/lib-icalendar-component-alarm_rb.html +0 -250
  114. data/test/coverage/lib-icalendar-component-event_rb.html +0 -353
  115. data/test/coverage/lib-icalendar-component-freebusy_rb.html +0 -245
  116. data/test/coverage/lib-icalendar-component-journal_rb.html +0 -278
  117. data/test/coverage/lib-icalendar-component-timezone_rb.html +0 -326
  118. data/test/coverage/lib-icalendar-component-todo_rb.html +0 -277
  119. data/test/coverage/lib-icalendar-component_rb.html +0 -733
  120. data/test/coverage/lib-icalendar-conversions_rb.html +0 -358
  121. data/test/coverage/lib-icalendar-parser_rb.html +0 -671
  122. data/test/coverage/lib-icalendar-rrule_rb.html +0 -357
  123. data/test/coverage/lib-icalendar_rb.html +0 -243
  124. data/test/coverage/lib-meta_rb.html +0 -234
@@ -1,148 +0,0 @@
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: Fixnum</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">Fixnum</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/icalendar/conversions_rb.html">
59
- lib/icalendar/conversions.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="Object.html">
69
- Object
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
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000012">to_ical</a>&nbsp;&nbsp;
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
-
98
- <!-- if includes -->
99
-
100
- <div id="section">
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <!-- if method_list -->
110
- <div id="methods">
111
- <h3 class="section-bar">Public Instance methods</h3>
112
-
113
- <div id="method-M000012" class="method-detail">
114
- <a name="M000012"></a>
115
-
116
- <div class="method-heading">
117
- <a href="#M000012" class="method-signature">
118
- <span class="method-name">to_ical</span><span class="method-args">()</span>
119
- </a>
120
- </div>
121
-
122
- <div class="method-description">
123
- <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000012-source">
126
- <pre>
127
- <span class="ruby-comment cmt"># File lib/icalendar/conversions.rb, line 34</span>
128
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ical</span>
129
- <span class="ruby-node">&quot;#{self}&quot;</span>
130
- <span class="ruby-keyword kw">end</span>
131
- </pre>
132
- </div>
133
- </div>
134
- </div>
135
-
136
-
137
- </div>
138
-
139
-
140
- </div>
141
-
142
-
143
- <div id="validator-badges">
144
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
145
- </div>
146
-
147
- </body>
148
- </html>
@@ -1,148 +0,0 @@
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: Float</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">Float</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/icalendar/conversions_rb.html">
59
- lib/icalendar/conversions.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="Object.html">
69
- Object
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
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000010">to_ical</a>&nbsp;&nbsp;
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
-
98
- <!-- if includes -->
99
-
100
- <div id="section">
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <!-- if method_list -->
110
- <div id="methods">
111
- <h3 class="section-bar">Public Instance methods</h3>
112
-
113
- <div id="method-M000010" class="method-detail">
114
- <a name="M000010"></a>
115
-
116
- <div class="method-heading">
117
- <a href="#M000010" class="method-signature">
118
- <span class="method-name">to_ical</span><span class="method-args">()</span>
119
- </a>
120
- </div>
121
-
122
- <div class="method-description">
123
- <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000010-source">
126
- <pre>
127
- <span class="ruby-comment cmt"># File lib/icalendar/conversions.rb, line 46</span>
128
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ical</span>
129
- <span class="ruby-node">&quot;#{self}&quot;</span>
130
- <span class="ruby-keyword kw">end</span>
131
- </pre>
132
- </div>
133
- </div>
134
- </div>
135
-
136
-
137
- </div>
138
-
139
-
140
- </div>
141
-
142
-
143
- <div id="validator-badges">
144
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
145
- </div>
146
-
147
- </body>
148
- </html>
@@ -1,212 +0,0 @@
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>Module: HashAttrs</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>Module</strong></td>
53
- <td class="class-name-in-header">HashAttrs</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/hash_attrs_rb.html">
59
- lib/hash_attrs.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- A module which adds some generators for hash based accessors.
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000024">hash_accessor</a>&nbsp;&nbsp;
90
- <a href="#M000022">hash_reader</a>&nbsp;&nbsp;
91
- <a href="#M000023">hash_writer</a>&nbsp;&nbsp;
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
-
98
- <!-- if includes -->
99
-
100
- <div id="section">
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <!-- if method_list -->
110
- <div id="methods">
111
- <h3 class="section-bar">Public Instance methods</h3>
112
-
113
- <div id="method-M000024" class="method-detail">
114
- <a name="M000024"></a>
115
-
116
- <div class="method-heading">
117
- <a href="#M000024" class="method-signature">
118
- <span class="method-name">hash_accessor</span><span class="method-args">(hash, *syms)</span>
119
- </a>
120
- </div>
121
-
122
- <div class="method-description">
123
- <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000024-source">
126
- <pre>
127
- <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 29</span>
128
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_accessor</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
129
- <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">syms</span>)
130
- <span class="ruby-identifier">hash_writer</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">syms</span>)
131
- <span class="ruby-keyword kw">end</span>
132
- </pre>
133
- </div>
134
- </div>
135
- </div>
136
-
137
- <div id="method-M000022" class="method-detail">
138
- <a name="M000022"></a>
139
-
140
- <div class="method-heading">
141
- <a href="#M000022" class="method-signature">
142
- <span class="method-name">hash_reader</span><span class="method-args">(hash_sym, syms)</span>
143
- </a>
144
- </div>
145
-
146
- <div class="method-description">
147
- <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000022-source">
150
- <pre>
151
- <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 4</span>
152
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
153
- <span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
154
- <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
155
- <span class="ruby-identifier">func</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
156
- <span class="ruby-identifier">hash</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">hash_sym</span>)
157
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>]
158
- <span class="ruby-keyword kw">end</span>
159
-
160
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">func</span>)
161
- <span class="ruby-keyword kw">end</span>
162
- <span class="ruby-keyword kw">end</span>
163
- </pre>
164
- </div>
165
- </div>
166
- </div>
167
-
168
- <div id="method-M000023" class="method-detail">
169
- <a name="M000023"></a>
170
-
171
- <div class="method-heading">
172
- <a href="#M000023" class="method-signature">
173
- <span class="method-name">hash_writer</span><span class="method-args">(hash_sym, syms)</span>
174
- </a>
175
- </div>
176
-
177
- <div class="method-description">
178
- <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000023-source">
181
- <pre>
182
- <span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 16</span>
183
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_writer</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
184
- <span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
185
- <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
186
-
187
- <span class="ruby-identifier">func</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
188
- <span class="ruby-identifier">hash</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">hash_sym</span>)
189
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">val</span>
190
- <span class="ruby-keyword kw">end</span>
191
-
192
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">+</span><span class="ruby-value str">'='</span>, <span class="ruby-identifier">func</span>)
193
- <span class="ruby-keyword kw">end</span>
194
- <span class="ruby-keyword kw">end</span>
195
- </pre>
196
- </div>
197
- </div>
198
- </div>
199
-
200
-
201
- </div>
202
-
203
-
204
- </div>
205
-
206
-
207
- <div id="validator-badges">
208
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
209
- </div>
210
-
211
- </body>
212
- </html>