wee 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. data/TODO +31 -0
  2. data/benchmark.rb +37 -0
  3. data/demo.ru +11 -0
  4. data/doc/rdoc/classes/Array.html +22 -26
  5. data/doc/rdoc/classes/Hash.html +22 -26
  6. data/doc/rdoc/classes/Object.html +21 -26
  7. data/doc/rdoc/classes/String.html +19 -87
  8. data/doc/rdoc/classes/Struct.html +22 -26
  9. data/doc/rdoc/classes/Wee.html +75 -206
  10. data/doc/rdoc/classes/Wee/AnswerDecoration.html +35 -66
  11. data/doc/rdoc/classes/Wee/AnswerDecoration/Answer.html +28 -46
  12. data/doc/rdoc/classes/Wee/Application.html +63 -114
  13. data/doc/rdoc/classes/Wee/Application/SessionCache.html +30 -44
  14. data/doc/rdoc/classes/Wee/Brush.html +52 -101
  15. data/doc/rdoc/classes/Wee/Brush/ActionInputTag.html +29 -51
  16. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +44 -101
  17. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +43 -76
  18. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +29 -46
  19. data/doc/rdoc/classes/Wee/Brush/FormTag.html +48 -110
  20. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +30 -42
  21. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +37 -58
  22. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +93 -210
  23. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +38 -63
  24. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +29 -45
  25. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +35 -52
  26. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +28 -61
  27. data/doc/rdoc/classes/Wee/Brush/InputTag.html +34 -107
  28. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +28 -54
  29. data/doc/rdoc/classes/Wee/Brush/Page.html +39 -73
  30. data/doc/rdoc/classes/Wee/Brush/PasswordInputTag.html +29 -45
  31. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +54 -98
  32. data/doc/rdoc/classes/Wee/Brush/RadioGroup.html +46 -84
  33. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +87 -187
  34. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +29 -56
  35. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +29 -45
  36. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +28 -55
  37. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +28 -55
  38. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +56 -113
  39. data/doc/rdoc/classes/Wee/Brush/TableTag.html +27 -58
  40. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -140
  41. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +29 -45
  42. data/doc/rdoc/classes/Wee/CallAnswerMixin.html +51 -79
  43. data/doc/rdoc/classes/Wee/CallbackMixin.html +44 -77
  44. data/doc/rdoc/classes/Wee/CallbackRegistry.html +69 -125
  45. data/doc/rdoc/classes/Wee/Callbacks.html +43 -82
  46. data/doc/rdoc/classes/Wee/Component.html +142 -292
  47. data/doc/rdoc/classes/Wee/Decoration.html +85 -141
  48. data/doc/rdoc/classes/Wee/DecorationMixin.html +111 -118
  49. data/doc/rdoc/classes/Wee/Delegate.html +72 -115
  50. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +37 -54
  51. data/doc/rdoc/classes/Wee/ErrorResponse.html +31 -48
  52. data/doc/rdoc/classes/Wee/FormDecoration.html +32 -46
  53. data/doc/rdoc/classes/Wee/GenericResponse.html +30 -50
  54. data/doc/rdoc/classes/Wee/HtmlCanvas.html +209 -562
  55. data/doc/rdoc/classes/Wee/HtmlDocument.html +51 -91
  56. data/doc/rdoc/classes/Wee/HtmlWriter.html +76 -156
  57. data/doc/rdoc/classes/Wee/IdGenerator.html +28 -44
  58. data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +53 -95
  59. data/doc/rdoc/classes/Wee/IdGenerator/Sequential.html +37 -63
  60. data/doc/rdoc/classes/Wee/JQuery.html +36 -64
  61. data/doc/rdoc/classes/Wee/LRUCache.html +94 -189
  62. data/doc/rdoc/classes/Wee/LRUCache/Item.html +30 -42
  63. data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +37 -54
  64. data/doc/rdoc/classes/Wee/PageDecoration.html +48 -79
  65. data/doc/rdoc/classes/Wee/Presenter.html +86 -143
  66. data/doc/rdoc/classes/Wee/RedirectResponse.html +31 -49
  67. data/doc/rdoc/classes/Wee/RefreshResponse.html +34 -48
  68. data/doc/rdoc/classes/Wee/Renderer.html +56 -125
  69. data/doc/rdoc/classes/Wee/Request.html +57 -115
  70. data/doc/rdoc/classes/Wee/Response.html +24 -26
  71. data/doc/rdoc/classes/Wee/Session.html +137 -292
  72. data/doc/rdoc/classes/Wee/Session/AbortCallbackProcessing.html +29 -46
  73. data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +29 -42
  74. data/doc/rdoc/classes/Wee/Session/Page.html +22 -21
  75. data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +36 -60
  76. data/doc/rdoc/classes/Wee/State.html +57 -105
  77. data/doc/rdoc/classes/Wee/State/Snapshot.html +22 -21
  78. data/doc/rdoc/classes/Wee/State/SnapshotIVars.html +22 -21
  79. data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +37 -54
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +42 -68
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/README_rdoc.html +26 -17
  83. data/doc/rdoc/files/lib/wee/application_rb.html +25 -19
  84. data/doc/rdoc/files/lib/wee/call_answer_rb.html +23 -12
  85. data/doc/rdoc/files/lib/wee/callback_rb.html +23 -12
  86. data/doc/rdoc/files/lib/wee/component_rb.html +25 -19
  87. data/doc/rdoc/files/lib/wee/decoration_rb.html +23 -15
  88. data/doc/rdoc/files/lib/wee/html_brushes_rb.html +23 -12
  89. data/doc/rdoc/files/lib/wee/html_canvas_rb.html +23 -15
  90. data/doc/rdoc/files/lib/wee/html_document_rb.html +23 -15
  91. data/doc/rdoc/files/lib/wee/html_writer_rb.html +23 -15
  92. data/doc/rdoc/files/lib/wee/id_generator_rb.html +24 -17
  93. data/doc/rdoc/files/lib/wee/jquery/jquery_rb.html +23 -12
  94. data/doc/rdoc/files/lib/wee/jquery_rb.html +23 -15
  95. data/doc/rdoc/files/lib/wee/lru_cache_rb.html +23 -12
  96. data/doc/rdoc/files/lib/wee/presenter_rb.html +23 -12
  97. data/doc/rdoc/files/lib/wee/renderer_rb.html +23 -12
  98. data/doc/rdoc/files/lib/wee/request_rb.html +23 -15
  99. data/doc/rdoc/files/lib/wee/response_rb.html +24 -17
  100. data/doc/rdoc/files/lib/wee/session_rb.html +26 -21
  101. data/doc/rdoc/files/lib/wee/state_rb.html +23 -12
  102. data/doc/rdoc/files/lib/wee_rb.html +37 -47
  103. data/doc/rdoc/fr_class_index.html +12 -86
  104. data/doc/rdoc/fr_file_index.html +12 -30
  105. data/doc/rdoc/fr_method_index.html +242 -473
  106. data/doc/rdoc/index.html +8 -5
  107. data/doc/rdoc/rdoc-style.css +119 -210
  108. data/examples/ObjectSpaceBrowser.rb +4 -4
  109. data/examples/TODO +21 -0
  110. data/examples/ajax.rb +6 -4
  111. data/examples/blog.rb +42 -0
  112. data/examples/demo.rb +5 -3
  113. data/examples/demo/calculator.rb +3 -3
  114. data/examples/demo/calendar.rb +4 -4
  115. data/examples/demo/counter.rb +2 -2
  116. data/examples/demo/editable_counter.rb +2 -2
  117. data/examples/demo/example.rb +25 -16
  118. data/examples/demo/window.rb +10 -3
  119. data/examples/hw2.rb +17 -0
  120. data/examples/recipe/description.rb +170 -0
  121. data/examples/recipe/migrations/001_create_recipes.rb +13 -0
  122. data/examples/recipe/model.rb +27 -0
  123. data/examples/recipe/models/recipe.rb +18 -0
  124. data/examples/recipe/recipe_editor.rb +28 -0
  125. data/lib/wee.rb +1 -7
  126. data/lib/wee/component.rb +37 -74
  127. data/lib/wee/decoration.rb +16 -15
  128. data/lib/wee/html_brushes.rb +16 -17
  129. data/lib/wee/presenter.rb +2 -1
  130. data/lib/wee/response.rb +4 -4
  131. data/lib/wee/session.rb +2 -2
  132. data/lib/wee/state.rb +2 -2
  133. data/test/t.rb +67 -0
  134. data/wee.gemspec +1 -1
  135. metadata +157 -167
@@ -1,9 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
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
+
3
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
7
  <head>
5
- <title>Class: Wee::Brush::RadioGroup [RDoc Documentation]</title>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ <title>Class: Wee::Brush::RadioGroup</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
7
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
8
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9
12
  <script type="text/javascript">
@@ -22,7 +25,7 @@
22
25
  return false;
23
26
 
24
27
  elemStyle = elem.style;
25
-
28
+
26
29
  if ( elemStyle.display != "block" ) {
27
30
  elemStyle.display = "block"
28
31
  } else {
@@ -31,10 +34,10 @@
31
34
 
32
35
  return true;
33
36
  }
34
-
37
+
35
38
  // Make codeblocks hidden by default
36
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
-
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
38
41
  // ]]>
39
42
  </script>
40
43
 
@@ -42,6 +45,7 @@
42
45
  <body>
43
46
 
44
47
 
48
+
45
49
  <div id="classHeader">
46
50
  <table class="header-table">
47
51
  <tr class="top-aligned-row">
@@ -51,68 +55,48 @@
51
55
  <tr class="top-aligned-row">
52
56
  <td><strong>In:</strong></td>
53
57
  <td>
54
-
55
-
56
58
  <a href="../../../files/lib/wee/html_brushes_rb.html">
57
-
58
59
  lib/wee/html_brushes.rb
59
-
60
60
  </a>
61
-
62
-
63
61
  <br />
64
-
65
62
  </td>
66
63
  </tr>
67
64
 
68
-
69
65
  <tr class="top-aligned-row">
70
66
  <td><strong>Parent:</strong></td>
71
67
  <td>
72
-
73
68
  <a href="../../Object.html">
74
-
75
69
  Object
76
-
77
70
  </a>
78
-
79
71
  </td>
80
72
  </tr>
81
-
82
73
  </table>
83
74
  </div>
84
75
  <!-- banner header -->
85
76
 
86
77
  <div id="bodyContent">
87
78
 
79
+
80
+
88
81
  <div id="contextContent">
89
82
 
90
- <div id="description">
91
- <hr size="10"></hr><pre>
92
- Form - Radio
93
- </pre>
94
- <hr size="10"></hr>
95
- </div>
96
83
 
97
- </div>
98
84
 
85
+ </div>
99
86
 
100
87
  <div id="method-list">
101
88
  <h3 class="section-bar">Methods</h3>
102
89
 
103
90
  <div class="name-list">
104
-
105
- <a href="#M000174">add_callback</a>&nbsp;&nbsp;
106
-
107
- <a href="#M000175">call</a>&nbsp;&nbsp;
108
-
109
- <a href="#M000173">new</a>&nbsp;&nbsp;
110
-
91
+ <a href="#M000177">add_callback</a>&nbsp;&nbsp;
92
+ <a href="#M000178">call</a>&nbsp;&nbsp;
93
+ <a href="#M000176">new</a>&nbsp;&nbsp;
111
94
  </div>
112
95
  </div>
113
96
 
114
97
  </div>
115
98
 
99
+
116
100
  <!-- if includes -->
117
101
 
118
102
  <div id="section">
@@ -120,33 +104,29 @@
120
104
 
121
105
 
122
106
 
123
- <!-- if method_list -->
124
107
 
125
- <div id="methods">
108
+
126
109
 
127
- <h3 class="section-bar">Public Class methods</h3>
128
110
 
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Class methods</h3>
129
114
 
130
- <div id="method-M000173" class="method-detail">
131
- <a name="M000173"></a>
115
+ <div id="method-M000176" class="method-detail">
116
+ <a name="M000176"></a>
132
117
 
133
118
  <div class="method-heading">
134
-
135
- <a href="#M000173" class="method-signature">
136
-
119
+ <a href="#M000176" class="method-signature">
137
120
  <span class="method-name">new</span><span class="method-args">(canvas)</span>
138
-
139
121
  </a>
140
-
141
122
  </div>
142
-
123
+
143
124
  <div class="method-description">
144
-
145
125
  <p><a class="source-toggle" href="#"
146
- onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
147
- <div class="method-source-code" id="M000173-source">
126
+ onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000176-source">
148
128
  <pre>
149
- <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 613</span>
129
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 612</span>
150
130
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">canvas</span>)
151
131
  <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">canvas</span>.<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">:input</span>, <span class="ruby-keyword kw">self</span>)
152
132
  <span class="ruby-ivar">@callbacks</span> = {}
@@ -154,34 +134,26 @@
154
134
  <span class="ruby-keyword kw">end</span>
155
135
  </pre>
156
136
  </div>
157
-
158
137
  </div>
159
138
  </div>
160
139
 
161
-
162
140
  <h3 class="section-bar">Public Instance methods</h3>
163
141
 
164
-
165
- <div id="method-M000174" class="method-detail">
166
- <a name="M000174"></a>
142
+ <div id="method-M000177" class="method-detail">
143
+ <a name="M000177"></a>
167
144
 
168
145
  <div class="method-heading">
169
-
170
- <a href="#M000174" class="method-signature">
171
-
146
+ <a href="#M000177" class="method-signature">
172
147
  <span class="method-name">add_callback</span><span class="method-args">(callback)</span>
173
-
174
148
  </a>
175
-
176
149
  </div>
177
-
150
+
178
151
  <div class="method-description">
179
-
180
152
  <p><a class="source-toggle" href="#"
181
- onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
182
- <div class="method-source-code" id="M000174-source">
153
+ onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000177-source">
183
155
  <pre>
184
- <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 619</span>
156
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 618</span>
185
157
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_callback</span>(<span class="ruby-identifier">callback</span>)
186
158
  <span class="ruby-identifier">value</span> = <span class="ruby-ivar">@ids</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
187
159
  <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">value</span>] = <span class="ruby-identifier">callback</span>
@@ -189,31 +161,24 @@
189
161
  <span class="ruby-keyword kw">end</span>
190
162
  </pre>
191
163
  </div>
192
-
193
164
  </div>
194
165
  </div>
195
166
 
196
-
197
- <div id="method-M000175" class="method-detail">
198
- <a name="M000175"></a>
167
+ <div id="method-M000178" class="method-detail">
168
+ <a name="M000178"></a>
199
169
 
200
170
  <div class="method-heading">
201
-
202
- <a href="#M000175" class="method-signature">
203
-
171
+ <a href="#M000178" class="method-signature">
204
172
  <span class="method-name">call</span><span class="method-args">(value)</span>
205
-
206
173
  </a>
207
-
208
174
  </div>
209
-
175
+
210
176
  <div class="method-description">
211
-
212
177
  <p><a class="source-toggle" href="#"
213
- onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
214
- <div class="method-source-code" id="M000175-source">
178
+ onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000178-source">
215
180
  <pre>
216
- <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 625</span>
181
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 624</span>
217
182
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">value</span>)
218
183
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@callbacks</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">value</span>)
219
184
  <span class="ruby-identifier">cb</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">value</span>]
@@ -224,22 +189,19 @@
224
189
  <span class="ruby-keyword kw">end</span>
225
190
  </pre>
226
191
  </div>
227
-
228
192
  </div>
229
193
  </div>
230
194
 
231
195
 
232
-
233
196
  </div>
234
197
 
235
198
 
236
-
237
-
238
199
  </div>
239
200
 
201
+
240
202
  <div id="validator-badges">
241
203
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
242
204
  </div>
243
205
 
244
206
  </body>
245
- </html>
207
+ </html>
@@ -1,9 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
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
+
3
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
7
  <head>
5
- <title>Class: Wee::Brush::SelectListTag [RDoc Documentation]</title>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ <title>Class: Wee::Brush::SelectListTag</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
7
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
8
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9
12
  <script type="text/javascript">
@@ -22,7 +25,7 @@
22
25
  return false;
23
26
 
24
27
  elemStyle = elem.style;
25
-
28
+
26
29
  if ( elemStyle.display != "block" ) {
27
30
  elemStyle.display = "block"
28
31
  } else {
@@ -31,10 +34,10 @@
31
34
 
32
35
  return true;
33
36
  }
34
-
37
+
35
38
  // Make codeblocks hidden by default
36
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
-
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
38
41
  // ]]>
39
42
  </script>
40
43
 
@@ -42,6 +45,7 @@
42
45
  <body>
43
46
 
44
47
 
48
+
45
49
  <div id="classHeader">
46
50
  <table class="header-table">
47
51
  <tr class="top-aligned-row">
@@ -51,99 +55,72 @@
51
55
  <tr class="top-aligned-row">
52
56
  <td><strong>In:</strong></td>
53
57
  <td>
54
-
55
-
56
58
  <a href="../../../files/lib/wee/html_brushes_rb.html">
57
-
58
59
  lib/wee/html_brushes.rb
59
-
60
60
  </a>
61
-
62
-
63
61
  <br />
64
-
65
62
  </td>
66
63
  </tr>
67
64
 
68
-
69
65
  <tr class="top-aligned-row">
70
66
  <td><strong>Parent:</strong></td>
71
67
  <td>
72
-
73
68
  Brush::GenericTagBrush
74
-
75
69
  </td>
76
70
  </tr>
77
-
78
71
  </table>
79
72
  </div>
80
73
  <!-- banner header -->
81
74
 
82
75
  <div id="bodyContent">
83
76
 
77
+
78
+
84
79
  <div id="contextContent">
85
80
 
86
- <div id="description">
87
- <hr size="10"></hr><pre>
88
- Form - Select
89
- </pre>
90
- <hr size="10"></hr>
91
- </div>
92
81
 
93
- </div>
94
82
 
83
+ </div>
95
84
 
96
85
  <div id="method-list">
97
86
  <h3 class="section-bar">Methods</h3>
98
87
 
99
88
  <div class="name-list">
100
-
101
- <a href="#M000169">__callback</a>&nbsp;&nbsp;
102
-
103
- <a href="#M000170">get_item</a>&nbsp;&nbsp;
104
-
105
- <a href="#M000166">items</a>&nbsp;&nbsp;
106
-
107
- <a href="#M000168">labels</a>&nbsp;&nbsp;
108
-
109
- <a href="#M000165">new</a>&nbsp;&nbsp;
110
-
111
- <a href="#M000167">selected</a>&nbsp;&nbsp;
112
-
113
- <a href="#M000171">with</a>&nbsp;&nbsp;
114
-
89
+ <a href="#M000134">__callback</a>&nbsp;&nbsp;
90
+ <a href="#M000135">handler</a>&nbsp;&nbsp;
91
+ <a href="#M000131">items</a>&nbsp;&nbsp;
92
+ <a href="#M000133">labels</a>&nbsp;&nbsp;
93
+ <a href="#M000130">new</a>&nbsp;&nbsp;
94
+ <a href="#M000132">selected</a>&nbsp;&nbsp;
95
+ <a href="#M000136">with</a>&nbsp;&nbsp;
115
96
  </div>
116
97
  </div>
117
98
 
118
99
  </div>
119
100
 
120
- <!-- if includes -->
121
101
 
102
+ <!-- if includes -->
122
103
  <div id="includes">
123
104
  <h3 class="section-bar">Included Modules</h3>
124
105
 
125
106
  <div id="includes-list">
126
-
127
107
  <span class="include-name"><a href="../CallbackMixin.html">CallbackMixin</a></span>
128
-
129
108
  </div>
130
109
  </div>
131
110
 
132
111
  <div id="section">
133
112
 
113
+
134
114
  <div id="constants-list">
135
115
  <h3 class="section-bar">Constants</h3>
136
116
 
137
117
  <div class="name-list">
138
118
  <table summary="Constants">
139
-
140
119
  <tr class="top-aligned-row context-row">
141
120
  <td class="context-item-name">HTML_TAG</td>
142
121
  <td>=</td>
143
122
  <td class="context-item-value">'select'.freeze</td>
144
-
145
123
  </tr>
146
-
147
124
  </table>
148
125
  </div>
149
126
  </div>
@@ -155,93 +132,64 @@
155
132
 
156
133
  <div class="name-list">
157
134
  <table>
158
-
159
135
  <tr class="top-aligned-row context-row">
160
136
  <td class="context-item-name">disabled</td>
161
-
162
137
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
163
-
164
138
  <td class="context-item-desc"></td>
165
139
  </tr>
166
-
167
140
  <tr class="top-aligned-row context-row">
168
141
  <td class="context-item-name">multiple</td>
169
-
170
142
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
171
-
172
143
  <td class="context-item-desc"></td>
173
144
  </tr>
174
-
175
145
  <tr class="top-aligned-row context-row">
176
146
  <td class="context-item-name">readonly</td>
177
-
178
147
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
179
-
180
148
  <td class="context-item-desc"></td>
181
149
  </tr>
182
-
183
150
  <tr class="top-aligned-row context-row">
184
151
  <td class="context-item-name">size</td>
185
-
186
152
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
187
-
188
153
  <td class="context-item-desc"></td>
189
154
  </tr>
190
-
191
155
  <tr class="top-aligned-row context-row">
192
156
  <td class="context-item-name">type</td>
193
-
194
157
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
195
-
196
158
  <td class="context-item-desc"></td>
197
159
  </tr>
198
-
199
160
  <tr class="top-aligned-row context-row">
200
161
  <td class="context-item-name">type</td>
201
-
202
162
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
203
-
204
163
  <td class="context-item-desc"></td>
205
164
  </tr>
206
-
207
165
  <tr class="top-aligned-row context-row">
208
166
  <td class="context-item-name">type</td>
209
-
210
167
  <td class="context-item-value">&nbsp;[HtmlAttribute]&nbsp;</td>
211
-
212
168
  <td class="context-item-desc"></td>
213
169
  </tr>
214
-
215
170
  </table>
216
171
  </div>
217
172
  </div>
173
+
218
174
 
219
175
 
220
176
  <!-- if method_list -->
221
-
222
177
  <div id="methods">
223
-
224
178
  <h3 class="section-bar">Public Class methods</h3>
225
179
 
226
-
227
- <div id="method-M000165" class="method-detail">
228
- <a name="M000165"></a>
180
+ <div id="method-M000130" class="method-detail">
181
+ <a name="M000130"></a>
229
182
 
230
183
  <div class="method-heading">
231
-
232
- <a href="#M000165" class="method-signature">
233
-
184
+ <a href="#M000130" class="method-signature">
234
185
  <span class="method-name">new</span><span class="method-args">(items)</span>
235
-
236
186
  </a>
237
-
238
187
  </div>
239
-
188
+
240
189
  <div class="method-description">
241
-
242
190
  <p><a class="source-toggle" href="#"
243
- onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
244
- <div class="method-source-code" id="M000165-source">
191
+ onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
192
+ <div class="method-source-code" id="M000130-source">
245
193
  <pre>
246
194
  <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 524</span>
247
195
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">items</span>)
@@ -250,32 +198,24 @@
250
198
  <span class="ruby-keyword kw">end</span>
251
199
  </pre>
252
200
  </div>
253
-
254
201
  </div>
255
202
  </div>
256
203
 
257
-
258
204
  <h3 class="section-bar">Public Instance methods</h3>
259
205
 
260
-
261
- <div id="method-M000169" class="method-detail">
262
- <a name="M000169"></a>
206
+ <div id="method-M000134" class="method-detail">
207
+ <a name="M000134"></a>
263
208
 
264
209
  <div class="method-heading">
265
-
266
- <a href="#M000169" class="method-signature">
267
-
210
+ <a href="#M000134" class="method-signature">
268
211
  <span class="method-name">__callback</span><span class="method-args">()</span>
269
-
270
212
  </a>
271
-
272
213
  </div>
273
-
214
+
274
215
  <div class="method-description">
275
-
276
216
  <p><a class="source-toggle" href="#"
277
- onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
278
- <div class="method-source-code" id="M000169-source">
217
+ onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
218
+ <div class="method-source-code" id="M000134-source">
279
219
  <pre>
280
220
  <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 552</span>
281
221
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__callback</span>
@@ -283,44 +223,26 @@
283
223
  <span class="ruby-comment cmt"># A callback was specified. We have to wrap it inside another</span>
284
224
  <span class="ruby-comment cmt"># callback, as we want to perform some additional actions.</span>
285
225
  <span class="ruby-comment cmt">#</span>
286
- <span class="ruby-identifier">name</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">:input</span>, <span class="ruby-identifier">proc</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">input</span><span class="ruby-operator">|</span>
287
- <span class="ruby-identifier">input</span> = [<span class="ruby-identifier">input</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
288
- <span class="ruby-identifier">choosen</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span> <span class="ruby-identifier">get_item</span>(<span class="ruby-identifier">idx</span>) }
289
-
290
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:multiple</span>)
291
- <span class="ruby-ivar">@callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">choosen</span>)
292
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">choosen</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
293
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;more than one element was choosen from a not-multiple SelectListTag&quot;</span>
294
- <span class="ruby-keyword kw">else</span>
295
- <span class="ruby-ivar">@callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">choosen</span>.<span class="ruby-identifier">first</span>)
296
- <span class="ruby-keyword kw">end</span>
297
- }))
226
+ <span class="ruby-identifier">name</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">:input</span>, <span class="ruby-identifier">method</span>(<span class="ruby-identifier">:handler</span>)) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;[]&quot;</span>)
298
227
  <span class="ruby-keyword kw">end</span>
299
228
  </pre>
300
229
  </div>
301
-
302
230
  </div>
303
231
  </div>
304
232
 
305
-
306
- <div id="method-M000166" class="method-detail">
307
- <a name="M000166"></a>
233
+ <div id="method-M000131" class="method-detail">
234
+ <a name="M000131"></a>
308
235
 
309
236
  <div class="method-heading">
310
-
311
- <a href="#M000166" class="method-signature">
312
-
237
+ <a href="#M000131" class="method-signature">
313
238
  <span class="method-name">items</span><span class="method-args">(items)</span>
314
-
315
239
  </a>
316
-
317
240
  </div>
318
-
241
+
319
242
  <div class="method-description">
320
-
321
243
  <p><a class="source-toggle" href="#"
322
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
323
- <div class="method-source-code" id="M000166-source">
244
+ onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
245
+ <div class="method-source-code" id="M000131-source">
324
246
  <pre>
325
247
  <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 529</span>
326
248
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">items</span>(<span class="ruby-identifier">items</span>)
@@ -329,29 +251,22 @@
329
251
  <span class="ruby-keyword kw">end</span>
330
252
  </pre>
331
253
  </div>
332
-
333
254
  </div>
334
255
  </div>
335
256
 
336
-
337
- <div id="method-M000168" class="method-detail">
338
- <a name="M000168"></a>
257
+ <div id="method-M000133" class="method-detail">
258
+ <a name="M000133"></a>
339
259
 
340
260
  <div class="method-heading">
341
-
342
- <a href="#M000168" class="method-signature">
343
-
261
+ <a href="#M000133" class="method-signature">
344
262
  <span class="method-name">labels</span><span class="method-args">(arg=nil, &amp;block)</span>
345
-
346
263
  </a>
347
-
348
264
  </div>
349
-
265
+
350
266
  <div class="method-description">
351
-
352
267
  <p><a class="source-toggle" href="#"
353
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
354
- <div class="method-source-code" id="M000168-source">
268
+ onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
269
+ <div class="method-source-code" id="M000133-source">
355
270
  <pre>
356
271
  <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 540</span>
357
272
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">labels</span>(<span class="ruby-identifier">arg</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -365,29 +280,22 @@
365
280
  <span class="ruby-keyword kw">end</span>
366
281
  </pre>
367
282
  </div>
368
-
369
283
  </div>
370
284
  </div>
371
285
 
372
-
373
- <div id="method-M000167" class="method-detail">
374
- <a name="M000167"></a>
286
+ <div id="method-M000132" class="method-detail">
287
+ <a name="M000132"></a>
375
288
 
376
289
  <div class="method-heading">
377
-
378
- <a href="#M000167" class="method-signature">
379
-
290
+ <a href="#M000132" class="method-signature">
380
291
  <span class="method-name">selected</span><span class="method-args">(arg=nil, &amp;block)</span>
381
-
382
292
  </a>
383
-
384
293
  </div>
385
-
294
+
386
295
  <div class="method-description">
387
-
388
296
  <p><a class="source-toggle" href="#"
389
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
390
- <div class="method-source-code" id="M000167-source">
297
+ onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
298
+ <div class="method-source-code" id="M000132-source">
391
299
  <pre>
392
300
  <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 534</span>
393
301
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">selected</span>(<span class="ruby-identifier">arg</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -397,31 +305,24 @@
397
305
  <span class="ruby-keyword kw">end</span>
398
306
  </pre>
399
307
  </div>
400
-
401
308
  </div>
402
309
  </div>
403
310
 
404
-
405
- <div id="method-M000171" class="method-detail">
406
- <a name="M000171"></a>
311
+ <div id="method-M000136" class="method-detail">
312
+ <a name="M000136"></a>
407
313
 
408
314
  <div class="method-heading">
409
-
410
- <a href="#M000171" class="method-signature">
411
-
315
+ <a href="#M000136" class="method-signature">
412
316
  <span class="method-name">with</span><span class="method-args">()</span>
413
-
414
317
  </a>
415
-
416
318
  </div>
417
-
319
+
418
320
  <div class="method-description">
419
-
420
321
  <p><a class="source-toggle" href="#"
421
- onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
422
- <div class="method-source-code" id="M000171-source">
322
+ onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
323
+ <div class="method-source-code" id="M000136-source">
423
324
  <pre>
424
- <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 579</span>
325
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 578</span>
425
326
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>
426
327
  <span class="ruby-ivar">@labels</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span>}
427
328
 
@@ -440,57 +341,56 @@
440
341
  <span class="ruby-keyword kw">end</span>
441
342
  </pre>
442
343
  </div>
443
-
444
344
  </div>
445
345
  </div>
446
346
 
447
-
448
347
  <h3 class="section-bar">Protected Instance methods</h3>
449
348
 
450
-
451
- <div id="method-M000170" class="method-detail">
452
- <a name="M000170"></a>
349
+ <div id="method-M000135" class="method-detail">
350
+ <a name="M000135"></a>
453
351
 
454
352
  <div class="method-heading">
455
-
456
- <a href="#M000170" class="method-signature">
457
-
458
- <span class="method-name">get_item</span><span class="method-args">(idx)</span>
459
-
353
+ <a href="#M000135" class="method-signature">
354
+ <span class="method-name">handler</span><span class="method-args">(input)</span>
460
355
  </a>
461
-
462
356
  </div>
463
-
357
+
464
358
  <div class="method-description">
465
-
466
359
  <p><a class="source-toggle" href="#"
467
- onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
468
- <div class="method-source-code" id="M000170-source">
360
+ onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
361
+ <div class="method-source-code" id="M000135-source">
469
362
  <pre>
470
- <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 571</span>
471
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_item</span>(<span class="ruby-identifier">idx</span>)
472
- <span class="ruby-identifier">idx</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">idx</span>)
473
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">IndexError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">size</span>
474
- <span class="ruby-ivar">@items</span>[<span class="ruby-identifier">idx</span>]
363
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 560</span>
364
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handler</span>(<span class="ruby-identifier">input</span>)
365
+ <span class="ruby-identifier">choosen</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
366
+ <span class="ruby-identifier">idx</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">idx</span>)
367
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">IndexError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">idx</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">size</span>
368
+ <span class="ruby-ivar">@items</span>[<span class="ruby-identifier">idx</span>]
369
+ }
370
+
371
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:multiple</span>)
372
+ <span class="ruby-ivar">@callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">choosen</span>)
373
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">choosen</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
374
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;more than one element was choosen from a not-multiple SelectListTag&quot;</span>
375
+ <span class="ruby-keyword kw">else</span>
376
+ <span class="ruby-ivar">@callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">choosen</span>.<span class="ruby-identifier">first</span>)
377
+ <span class="ruby-keyword kw">end</span>
475
378
  <span class="ruby-keyword kw">end</span>
476
379
  </pre>
477
380
  </div>
478
-
479
381
  </div>
480
382
  </div>
481
383
 
482
384
 
483
-
484
385
  </div>
485
386
 
486
387
 
487
-
488
-
489
388
  </div>
490
389
 
390
+
491
391
  <div id="validator-badges">
492
392
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
493
393
  </div>
494
394
 
495
395
  </body>
496
- </html>
396
+ </html>