wee 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/ChangeLog +286 -0
  2. data/Features +185 -0
  3. data/doc/rdoc/classes/ActionView.html +107 -0
  4. data/doc/rdoc/classes/ActionView/Base.html +133 -0
  5. data/doc/rdoc/classes/Array.html +7 -59
  6. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  7. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  8. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  9. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  11. data/doc/rdoc/classes/Enumerable.html +6 -6
  12. data/doc/rdoc/classes/Hash.html +120 -0
  13. data/doc/rdoc/classes/Main.html +58 -34
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgScaffolder.html +165 -166
  16. data/doc/rdoc/classes/OgScaffolder/Editor.html +112 -112
  17. data/doc/rdoc/classes/String.html +7 -59
  18. data/doc/rdoc/classes/Struct.html +14 -14
  19. data/doc/rdoc/classes/Wee.html +70 -6
  20. data/doc/rdoc/classes/Wee/AbstractSession.html +502 -0
  21. data/doc/rdoc/classes/Wee/AnswerDecoration.html +11 -11
  22. data/doc/rdoc/classes/Wee/Application.html +139 -84
  23. data/doc/rdoc/classes/Wee/Brush.html +21 -18
  24. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +90 -17
  25. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +162 -0
  26. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +7 -7
  27. data/doc/rdoc/classes/Wee/Brush/FormTag.html +41 -17
  28. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  29. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  30. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +112 -86
  31. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  32. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +160 -0
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +15 -15
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +21 -21
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +234 -0
  39. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html +207 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +124 -28
  41. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +7 -7
  42. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  43. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  45. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  47. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  48. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -15
  49. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
  50. data/doc/rdoc/classes/Wee/CallbackRegistry.html +38 -38
  51. data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
  52. data/doc/rdoc/classes/Wee/CanvasMixin.html +225 -0
  53. data/doc/rdoc/classes/Wee/Component.html +202 -201
  54. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +7 -7
  55. data/doc/rdoc/classes/Wee/ComponentDispatcher.html +289 -0
  56. data/doc/rdoc/classes/Wee/ComponentRunner.html +321 -0
  57. data/doc/rdoc/classes/Wee/Context.html +63 -3
  58. data/doc/rdoc/classes/Wee/Decoration.html +45 -45
  59. data/doc/rdoc/classes/Wee/Delegate.html +30 -30
  60. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +164 -0
  61. data/doc/rdoc/classes/Wee/ErrorResponse.html +16 -16
  62. data/doc/rdoc/classes/Wee/Examples.html +114 -0
  63. data/doc/rdoc/classes/Wee/Examples/Calculator.html +319 -0
  64. data/doc/rdoc/classes/Wee/Examples/Counter.html +289 -0
  65. data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +210 -0
  66. data/doc/rdoc/classes/Wee/Examples/Window.html +346 -0
  67. data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +227 -0
  68. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  69. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +1230 -0
  71. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  72. data/doc/rdoc/classes/Wee/IdGenerator.html +148 -0
  73. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +27 -14
  74. data/doc/rdoc/classes/Wee/LoginDecoration.html +261 -0
  75. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +14 -14
  76. data/doc/rdoc/classes/Wee/MessageBox.html +14 -14
  77. data/doc/rdoc/classes/Wee/Nitro.html +114 -0
  78. data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +192 -0
  79. data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +345 -0
  80. data/doc/rdoc/classes/Wee/Nitro/FormTag.html +155 -0
  81. data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +178 -0
  82. data/doc/rdoc/classes/Wee/Page.html +4 -0
  83. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  84. data/doc/rdoc/classes/Wee/PagelessApplication.html +13 -11
  85. data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +296 -0
  86. data/doc/rdoc/classes/Wee/PagelessRequest.html +52 -21
  87. data/doc/rdoc/classes/Wee/PagelessSession.html +130 -91
  88. data/doc/rdoc/classes/Wee/Pager.html +534 -0
  89. data/doc/rdoc/classes/Wee/Presenter.html +482 -298
  90. data/doc/rdoc/classes/Wee/Rails.html +114 -0
  91. data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +192 -0
  92. data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +342 -0
  93. data/doc/rdoc/classes/Wee/Rails/FormTag.html +155 -0
  94. data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +177 -0
  95. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  96. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  97. data/doc/rdoc/classes/Wee/Renderer.html +208 -0
  98. data/doc/rdoc/classes/Wee/RenderingContext.html +175 -3
  99. data/doc/rdoc/classes/Wee/Request.html +197 -46
  100. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  101. data/doc/rdoc/classes/Wee/Response.html +44 -43
  102. data/doc/rdoc/classes/Wee/Session.html +296 -402
  103. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +14 -14
  104. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  105. data/doc/rdoc/classes/Wee/Utils.html +22 -22
  106. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  107. data/doc/rdoc/classes/Wee/ValueHolder.html +19 -19
  108. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +72 -46
  109. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  110. data/doc/rdoc/created.rid +1 -1
  111. data/doc/rdoc/files/INSTALL.html +1 -1
  112. data/doc/rdoc/files/README.html +8 -12
  113. data/doc/rdoc/files/lib/cache/cache_rb.html +1 -1
  114. data/doc/rdoc/files/lib/wee/abstractsession_rb.html +108 -0
  115. data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +108 -0
  116. data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +101 -0
  117. data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +101 -0
  118. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  119. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  120. data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +108 -0
  121. data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +1 -1
  122. data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +101 -0
  123. data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +1 -1
  124. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  125. data/doc/rdoc/files/lib/wee/components/pager_rb.html +101 -0
  126. data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +1 -1
  127. data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
  128. data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +1 -1
  129. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -1
  130. data/doc/rdoc/files/lib/wee/continuation_rb.html +1 -1
  131. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  132. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  133. data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +110 -0
  134. data/doc/rdoc/files/lib/wee/core/context_rb.html +101 -0
  135. data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
  136. data/doc/rdoc/files/lib/wee/core/idgen_rb.html +101 -0
  137. data/doc/rdoc/files/lib/wee/core/page_rb.html +101 -0
  138. data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
  139. data/doc/rdoc/files/lib/wee/core/renderer_rb.html +107 -0
  140. data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +1 -1
  141. data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +2 -2
  142. data/doc/rdoc/files/lib/wee/core_ext_rb.html +101 -0
  143. data/doc/rdoc/files/lib/wee/core_rb.html +7 -14
  144. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +1 -1
  145. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +1 -1
  146. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +1 -1
  147. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +1 -1
  148. data/doc/rdoc/files/lib/wee/databases/og_rb.html +1 -1
  149. data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +107 -0
  150. data/doc/rdoc/files/lib/wee/examples/counter_rb.html +101 -0
  151. data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +114 -0
  152. data/doc/rdoc/files/lib/wee/examples/window_rb.html +101 -0
  153. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +1 -1
  154. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +1 -1
  155. data/doc/rdoc/files/lib/wee/page_rb.html +1 -1
  156. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +8 -1
  157. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +1 -1
  158. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +2 -1
  159. data/doc/rdoc/files/lib/wee/pageless_rb.html +1 -1
  160. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  161. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
  162. data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
  163. data/doc/rdoc/files/lib/wee/request_rb.html +5 -4
  164. data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
  165. data/doc/rdoc/files/lib/wee/response_rb.html +2 -1
  166. data/doc/rdoc/files/lib/wee/session_rb.html +2 -3
  167. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +1 -1
  168. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +2 -2
  169. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +1 -1
  170. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +1 -1
  171. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +1 -1
  172. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +1 -1
  173. data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +1 -1
  174. data/doc/rdoc/files/lib/wee/template_rb.html +1 -1
  175. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  176. data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
  177. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  178. data/doc/rdoc/files/lib/wee/utils_rb.html +1 -1
  179. data/doc/rdoc/files/lib/wee_rb.html +5 -3
  180. data/doc/rdoc/fr_class_index.html +34 -2
  181. data/doc/rdoc/fr_file_index.html +17 -1
  182. data/doc/rdoc/fr_method_index.html +464 -314
  183. data/examples/ajax/ajax.rb +1 -1
  184. data/examples/demo.rb +47 -0
  185. data/examples/{calendar.rb → demo/calendar.rb} +89 -97
  186. data/examples/{example.rb → demo/example.rb} +17 -97
  187. data/examples/dispatcher.rb +37 -0
  188. data/examples/draw.rb +14 -11
  189. data/examples/nitro/run.rb +42 -0
  190. data/examples/radio.rb +44 -0
  191. data/examples/test.rb +3 -27
  192. data/lib/wee.rb +15 -3
  193. data/lib/wee/adaptors/nitro.rb +154 -0
  194. data/lib/wee/adaptors/rails.rb +154 -0
  195. data/lib/wee/application.rb +22 -20
  196. data/lib/wee/components.rb +3 -0
  197. data/lib/wee/components/component_dispatcher.rb +46 -0
  198. data/lib/wee/components/login_decoration.rb +35 -0
  199. data/lib/wee/components/messagebox.rb +2 -2
  200. data/lib/wee/components/pager.rb +102 -0
  201. data/lib/wee/continuation/core/component.rb +13 -12
  202. data/lib/wee/continuation/session.rb +11 -19
  203. data/lib/wee/core.rb +8 -7
  204. data/lib/wee/core/component.rb +8 -28
  205. data/lib/wee/core/componentrunner.rb +73 -0
  206. data/lib/wee/core/context.rb +27 -0
  207. data/lib/wee/core/idgen.rb +5 -0
  208. data/lib/wee/core/page.rb +1 -0
  209. data/lib/wee/core/presenter.rb +10 -126
  210. data/lib/wee/core/renderer.rb +23 -0
  211. data/lib/wee/core_ext.rb +122 -0
  212. data/lib/wee/databases/og/scaffolder.rb +0 -1
  213. data/lib/wee/examples/calculator.rb +70 -0
  214. data/lib/wee/examples/counter.rb +33 -0
  215. data/lib/wee/examples/editable_counter.rb +31 -0
  216. data/{examples → lib/wee/examples}/window.rb +29 -23
  217. data/lib/wee/idgen/md5.rb +1 -1
  218. data/lib/wee/idgen/simple.rb +1 -1
  219. data/lib/wee/pageless/session.rb +2 -3
  220. data/lib/wee/renderer/html/brushes.rb +142 -22
  221. data/lib/wee/renderer/html/canvas.rb +57 -19
  222. data/lib/wee/response.rb +3 -2
  223. data/lib/wee/session.rb +10 -54
  224. data/lib/wee/skeleton/og/components/main.rb +5 -1
  225. data/lib/wee/skeleton/og/conf/db.rb +1 -1
  226. data/lib/wee/snapshot_ext.rb +4 -10
  227. data/lib/wee/template.rb +19 -5
  228. data/lib/wee/utils/helper.rb +2 -2
  229. metadata +90 -13
  230. data/examples/calculator.rb +0 -67
  231. data/lib/wee/context.rb +0 -2
@@ -0,0 +1,234 @@
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: Wee::Brush::RadioButtonTag</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">Wee::Brush::RadioButtonTag</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/wee/renderer/html/brushes_rb.html">
59
+ lib/wee/renderer/html/brushes.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
+ Brush::InputTag
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
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="#M000239">callback</a>&nbsp;&nbsp;
90
+ <a href="#M000238">group</a>&nbsp;&nbsp;
91
+ <a href="#M000237">new</a>&nbsp;&nbsp;
92
+ <a href="#M000240">with</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+ <div id="class-list">
104
+ <h3 class="section-bar">Classes and Modules</h3>
105
+
106
+ Class <a href="RadioButtonTag/RadioGroup.html" class="link">Wee::Brush::RadioButtonTag::RadioGroup</a><br />
107
+
108
+ </div>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+ <div id="methods">
118
+ <h3 class="section-bar">Public Class methods</h3>
119
+
120
+ <div id="method-M000237" class="method-detail">
121
+ <a name="M000237"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="#M000237" class="method-signature">
125
+ <span class="method-name">new</span><span class="method-args">()</span>
126
+ </a>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+ <p><a class="source-toggle" href="#"
131
+ onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
132
+ <div class="method-source-code" id="M000237-source">
133
+ <pre>
134
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 432</span>
135
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
136
+ <span class="ruby-keyword kw">super</span>
137
+ <span class="ruby-identifier">type</span>(<span class="ruby-value str">'radio'</span>)
138
+ <span class="ruby-keyword kw">end</span>
139
+ </pre>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <h3 class="section-bar">Public Instance methods</h3>
145
+
146
+ <div id="method-M000239" class="method-detail">
147
+ <a name="M000239"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="#M000239" class="method-signature">
151
+ <span class="method-name">callback</span><span class="method-args">(symbol=nil, *args, &amp;block)</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p><a class="source-toggle" href="#"
157
+ onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
158
+ <div class="method-source-code" id="M000239-source">
159
+ <pre>
160
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 465</span>
161
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callback</span>(<span class="ruby-identifier">symbol</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
162
+ <span class="ruby-ivar">@callback</span> = <span class="ruby-identifier">to_callback</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>)
163
+ <span class="ruby-keyword kw">self</span>
164
+ <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <div id="method-M000238" class="method-detail">
171
+ <a name="M000238"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="#M000238" class="method-signature">
175
+ <span class="method-name">group</span><span class="method-args">(radio_group)</span>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+ <p><a class="source-toggle" href="#"
181
+ onclick="toggleCode('M000238-source');return false;">[Source]</a></p>
182
+ <div class="method-source-code" id="M000238-source">
183
+ <pre>
184
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 460</span>
185
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group</span>(<span class="ruby-identifier">radio_group</span>)
186
+ <span class="ruby-ivar">@group</span> = <span class="ruby-identifier">radio_group</span>
187
+ <span class="ruby-keyword kw">self</span>
188
+ <span class="ruby-keyword kw">end</span>
189
+ </pre>
190
+ </div>
191
+ </div>
192
+ </div>
193
+
194
+ <div id="method-M000240" class="method-detail">
195
+ <a name="M000240"></a>
196
+
197
+ <div class="method-heading">
198
+ <a href="#M000240" class="method-signature">
199
+ <span class="method-name">with</span><span class="method-args">()</span>
200
+ </a>
201
+ </div>
202
+
203
+ <div class="method-description">
204
+ <p><a class="source-toggle" href="#"
205
+ onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
206
+ <div class="method-source-code" id="M000240-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 470</span>
209
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>
210
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@group</span>
211
+ <span class="ruby-identifier">n</span>, <span class="ruby-identifier">v</span> = <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">add_callback</span>(<span class="ruby-ivar">@callback</span>)
212
+ <span class="ruby-identifier">name</span>(<span class="ruby-identifier">n</span>)
213
+ <span class="ruby-identifier">value</span>(<span class="ruby-identifier">v</span>)
214
+ <span class="ruby-keyword kw">end</span>
215
+ <span class="ruby-keyword kw">super</span>
216
+ <span class="ruby-keyword kw">end</span>
217
+ </pre>
218
+ </div>
219
+ </div>
220
+ </div>
221
+
222
+
223
+ </div>
224
+
225
+
226
+ </div>
227
+
228
+
229
+ <div id="validator-badges">
230
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
231
+ </div>
232
+
233
+ </body>
234
+ </html>
@@ -0,0 +1,207 @@
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: Wee::Brush::RadioButtonTag::RadioGroup</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">Wee::Brush::RadioButtonTag::RadioGroup</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/wee/renderer/html/brushes_rb.html">
59
+ lib/wee/renderer/html/brushes.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="#M000242">add_callback</a>&nbsp;&nbsp;
92
+ <a href="#M000243">call</a>&nbsp;&nbsp;
93
+ <a href="#M000241">new</a>&nbsp;&nbsp;
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+
100
+ <!-- if includes -->
101
+
102
+ <div id="section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Class methods</h3>
114
+
115
+ <div id="method-M000241" class="method-detail">
116
+ <a name="M000241"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000241" class="method-signature">
120
+ <span class="method-name">new</span><span class="method-args">(canvas)</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p><a class="source-toggle" href="#"
126
+ onclick="toggleCode('M000241-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000241-source">
128
+ <pre>
129
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 438</span>
130
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">canvas</span>)
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>)
132
+ <span class="ruby-ivar">@callbacks</span> = {}
133
+ <span class="ruby-ivar">@ids</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>
134
+ <span class="ruby-keyword kw">end</span>
135
+ </pre>
136
+ </div>
137
+ </div>
138
+ </div>
139
+
140
+ <h3 class="section-bar">Public Instance methods</h3>
141
+
142
+ <div id="method-M000242" class="method-detail">
143
+ <a name="M000242"></a>
144
+
145
+ <div class="method-heading">
146
+ <a href="#M000242" class="method-signature">
147
+ <span class="method-name">add_callback</span><span class="method-args">(callback)</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ <p><a class="source-toggle" href="#"
153
+ onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000242-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 444</span>
157
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_callback</span>(<span class="ruby-identifier">callback</span>)
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>
159
+ <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">value</span>] = <span class="ruby-identifier">callback</span>
160
+ <span class="ruby-keyword kw">return</span> [<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">value</span>]
161
+ <span class="ruby-keyword kw">end</span>
162
+ </pre>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ <div id="method-M000243" class="method-detail">
168
+ <a name="M000243"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="#M000243" class="method-signature">
172
+ <span class="method-name">call</span><span class="method-args">(value)</span>
173
+ </a>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+ <p><a class="source-toggle" href="#"
178
+ onclick="toggleCode('M000243-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000243-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 450</span>
182
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">value</span>)
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>)
184
+ <span class="ruby-identifier">cb</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">value</span>]
185
+ <span class="ruby-identifier">cb</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">value</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cb</span>
186
+ <span class="ruby-keyword kw">else</span>
187
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;invalid radio button/group value&quot;</span>
188
+ <span class="ruby-keyword kw">end</span>
189
+ <span class="ruby-keyword kw">end</span>
190
+ </pre>
191
+ </div>
192
+ </div>
193
+ </div>
194
+
195
+
196
+ </div>
197
+
198
+
199
+ </div>
200
+
201
+
202
+ <div id="validator-badges">
203
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
204
+ </div>
205
+
206
+ </body>
207
+ </html>
@@ -86,9 +86,12 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000167">callback</a>&nbsp;&nbsp;
90
- <a href="#M000166">new</a>&nbsp;&nbsp;
91
- <a href="#M000168">with</a>&nbsp;&nbsp;
89
+ <a href="#M000213">callback</a>&nbsp;&nbsp;
90
+ <a href="#M000210">items</a>&nbsp;&nbsp;
91
+ <a href="#M000212">labels</a>&nbsp;&nbsp;
92
+ <a href="#M000209">new</a>&nbsp;&nbsp;
93
+ <a href="#M000211">selected</a>&nbsp;&nbsp;
94
+ <a href="#M000214">with</a>&nbsp;&nbsp;
92
95
  </div>
93
96
  </div>
94
97
 
@@ -107,6 +110,19 @@
107
110
  </div>
108
111
 
109
112
 
113
+ <div id="aliases-list">
114
+ <h3 class="section-bar">External Aliases</h3>
115
+
116
+ <div class="name-list">
117
+ <table summary="aliases">
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">multiple</td>
120
+ <td>-></td>
121
+ <td class="context-item-value">multi</td>
122
+ </tr>
123
+ </table>
124
+ </div>
125
+ </div>
110
126
 
111
127
 
112
128
 
@@ -116,21 +132,21 @@
116
132
  <div id="methods">
117
133
  <h3 class="section-bar">Public Class methods</h3>
118
134
 
119
- <div id="method-M000166" class="method-detail">
120
- <a name="M000166"></a>
135
+ <div id="method-M000209" class="method-detail">
136
+ <a name="M000209"></a>
121
137
 
122
138
  <div class="method-heading">
123
- <a href="#M000166" class="method-signature">
139
+ <a href="#M000209" class="method-signature">
124
140
  <span class="method-name">new</span><span class="method-args">(items)</span>
125
141
  </a>
126
142
  </div>
127
143
 
128
144
  <div class="method-description">
129
145
  <p><a class="source-toggle" href="#"
130
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
131
- <div class="method-source-code" id="M000166-source">
146
+ onclick="toggleCode('M000209-source');return false;">[Source]</a></p>
147
+ <div class="method-source-code" id="M000209-source">
132
148
  <pre>
133
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 312</span>
149
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 335</span>
134
150
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">items</span>)
135
151
  <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">'select'</span>)
136
152
  <span class="ruby-ivar">@items</span> = <span class="ruby-identifier">items</span>
@@ -142,21 +158,21 @@
142
158
 
143
159
  <h3 class="section-bar">Public Instance methods</h3>
144
160
 
145
- <div id="method-M000167" class="method-detail">
146
- <a name="M000167"></a>
161
+ <div id="method-M000213" class="method-detail">
162
+ <a name="M000213"></a>
147
163
 
148
164
  <div class="method-heading">
149
- <a href="#M000167" class="method-signature">
165
+ <a href="#M000213" class="method-signature">
150
166
  <span class="method-name">callback</span><span class="method-args">(symbol=nil, *args, &amp;block)</span>
151
167
  </a>
152
168
  </div>
153
169
 
154
170
  <div class="method-description">
155
171
  <p><a class="source-toggle" href="#"
156
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
157
- <div class="method-source-code" id="M000167-source">
172
+ onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000213-source">
158
174
  <pre>
159
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 328</span>
175
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 362</span>
160
176
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callback</span>(<span class="ruby-identifier">symbol</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
161
177
  <span class="ruby-ivar">@callback</span> = <span class="ruby-identifier">to_callback</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>)
162
178
  <span class="ruby-keyword kw">self</span>
@@ -166,21 +182,100 @@
166
182
  </div>
167
183
  </div>
168
184
 
169
- <div id="method-M000168" class="method-detail">
170
- <a name="M000168"></a>
185
+ <div id="method-M000210" class="method-detail">
186
+ <a name="M000210"></a>
171
187
 
172
188
  <div class="method-heading">
173
- <a href="#M000168" class="method-signature">
174
- <span class="method-name">with</span><span class="method-args">()</span>
189
+ <a href="#M000210" class="method-signature">
190
+ <span class="method-name">items</span><span class="method-args">(arg)</span>
191
+ </a>
192
+ </div>
193
+
194
+ <div class="method-description">
195
+ <p><a class="source-toggle" href="#"
196
+ onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
197
+ <div class="method-source-code" id="M000210-source">
198
+ <pre>
199
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 340</span>
200
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">items</span>(<span class="ruby-identifier">arg</span>)
201
+ <span class="ruby-ivar">@items</span> = <span class="ruby-identifier">arg</span>
202
+ <span class="ruby-keyword kw">self</span>
203
+ <span class="ruby-keyword kw">end</span>
204
+ </pre>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <div id="method-M000212" class="method-detail">
210
+ <a name="M000212"></a>
211
+
212
+ <div class="method-heading">
213
+ <a href="#M000212" class="method-signature">
214
+ <span class="method-name">labels</span><span class="method-args">(arg=nil, &amp;block)</span>
175
215
  </a>
176
216
  </div>
177
217
 
178
218
  <div class="method-description">
179
219
  <p><a class="source-toggle" href="#"
180
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
181
- <div class="method-source-code" id="M000168-source">
220
+ onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
221
+ <div class="method-source-code" id="M000212-source">
182
222
  <pre>
183
223
  <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 351</span>
224
+ <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>)
225
+ <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">block</span>
226
+
227
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
228
+ <span class="ruby-ivar">@labels</span> = <span class="ruby-identifier">proc</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-ivar">@items</span>[<span class="ruby-identifier">i</span>])}
229
+ <span class="ruby-keyword kw">else</span>
230
+ <span class="ruby-ivar">@labels</span> = <span class="ruby-identifier">arg</span>
231
+ <span class="ruby-keyword kw">end</span>
232
+ <span class="ruby-keyword kw">self</span>
233
+ <span class="ruby-keyword kw">end</span>
234
+ </pre>
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ <div id="method-M000211" class="method-detail">
240
+ <a name="M000211"></a>
241
+
242
+ <div class="method-heading">
243
+ <a href="#M000211" class="method-signature">
244
+ <span class="method-name">selected</span><span class="method-args">(arg=nil, &amp;block)</span>
245
+ </a>
246
+ </div>
247
+
248
+ <div class="method-description">
249
+ <p><a class="source-toggle" href="#"
250
+ onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
251
+ <div class="method-source-code" id="M000211-source">
252
+ <pre>
253
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 345</span>
254
+ <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>)
255
+ <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">block</span>
256
+ <span class="ruby-ivar">@selected</span> = <span class="ruby-identifier">arg</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">block</span>
257
+ <span class="ruby-keyword kw">self</span>
258
+ <span class="ruby-keyword kw">end</span>
259
+ </pre>
260
+ </div>
261
+ </div>
262
+ </div>
263
+
264
+ <div id="method-M000214" class="method-detail">
265
+ <a name="M000214"></a>
266
+
267
+ <div class="method-heading">
268
+ <a href="#M000214" class="method-signature">
269
+ <span class="method-name">with</span><span class="method-args">()</span>
270
+ </a>
271
+ </div>
272
+
273
+ <div class="method-description">
274
+ <p><a class="source-toggle" href="#"
275
+ onclick="toggleCode('M000214-source');return false;">[Source]</a></p>
276
+ <div class="method-source-code" id="M000214-source">
277
+ <pre>
278
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 385</span>
184
279
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>
185
280
  <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> }
186
281
 
@@ -194,16 +289,17 @@
194
289
  <span class="ruby-keyword kw">end</span>
195
290
 
196
291
  <span class="ruby-keyword kw">super</span> <span class="ruby-keyword kw">do</span>
197
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_multiple</span>
292
+ <span class="ruby-identifier">meth</span> =
293
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_multiple</span>
198
294
  <span class="ruby-ivar">@selected</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
199
- <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">each_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
200
- <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">option</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">i</span>).<span class="ruby-identifier">selected</span>(<span class="ruby-ivar">@selected</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@items</span>[<span class="ruby-identifier">i</span>])).<span class="ruby-identifier">with</span>(<span class="ruby-ivar">@labels</span>[<span class="ruby-identifier">i</span>])
201
- }
295
+ <span class="ruby-ivar">@selected</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Proc</span>) <span class="ruby-operator">?</span> (<span class="ruby-identifier">:call</span>) <span class="ruby-operator">:</span> (<span class="ruby-identifier">:include?</span>)
202
296
  <span class="ruby-keyword kw">else</span>
203
- <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">each_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
204
- <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">option</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">i</span>).<span class="ruby-identifier">selected</span>(<span class="ruby-ivar">@selected</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@items</span>[<span class="ruby-identifier">i</span>]).<span class="ruby-identifier">with</span>(<span class="ruby-ivar">@labels</span>[<span class="ruby-identifier">i</span>])
205
- }
297
+ <span class="ruby-ivar">@selected</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Proc</span>) <span class="ruby-operator">?</span> (<span class="ruby-identifier">:call</span>) <span class="ruby-operator">:</span> (<span class="ruby-identifier">:==</span>)
206
298
  <span class="ruby-keyword kw">end</span>
299
+
300
+ <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">each_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
301
+ <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">option</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">i</span>).<span class="ruby-identifier">selected</span>(<span class="ruby-ivar">@selected</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-ivar">@items</span>[<span class="ruby-identifier">i</span>])).<span class="ruby-identifier">with</span>(<span class="ruby-ivar">@labels</span>[<span class="ruby-identifier">i</span>])
302
+ }
207
303
  <span class="ruby-keyword kw">end</span>
208
304
  <span class="ruby-keyword kw">end</span>
209
305
  </pre>