wee 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +75 -0
- data/README +17 -9
- data/Rakefile +2 -2
- data/TODO +20 -0
- data/benchmark/Makefile +14 -9
- data/benchmark/counter.rb +11 -30
- data/benchmark/report_req.rb +12 -0
- data/doc/rdoc/classes/Array.html +12 -12
- data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
- data/doc/rdoc/classes/Enumerable.html +6 -6
- data/doc/rdoc/classes/Object.html +12 -12
- data/doc/rdoc/classes/OgApplication.html +126 -0
- data/doc/rdoc/classes/OgScaffolder.html +401 -0
- data/doc/rdoc/classes/OgSession.html +172 -0
- data/doc/rdoc/classes/String.html +12 -12
- data/doc/rdoc/classes/Struct.html +12 -12
- data/doc/rdoc/classes/Wee.html +5 -62
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
- data/doc/rdoc/classes/Wee/Application.html +107 -39
- data/doc/rdoc/classes/Wee/Brush.html +22 -18
- data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +17 -11
- data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +18 -10
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +30 -64
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +8 -10
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +27 -79
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +146 -0
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +179 -65
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +16 -18
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +203 -0
- data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +17 -11
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +15 -15
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +147 -0
- data/doc/rdoc/classes/Wee/Brush/Page.html +17 -17
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +25 -50
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -38
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +15 -16
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +65 -50
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +14 -64
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/ToCallback.html +146 -0
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +40 -40
- data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
- data/doc/rdoc/classes/Wee/Canvas.html +24 -24
- data/doc/rdoc/classes/Wee/Component.html +232 -149
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +153 -0
- data/doc/rdoc/classes/Wee/Decoration.html +42 -42
- data/doc/rdoc/classes/Wee/Delegate.html +27 -27
- data/doc/rdoc/classes/Wee/ErrorResponse.html +12 -12
- data/doc/rdoc/classes/Wee/FormDecoration.html +148 -0
- data/doc/rdoc/classes/Wee/GenericResponse.html +6 -6
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +296 -215
- data/doc/rdoc/classes/Wee/HtmlWriter.html +83 -81
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +21 -16
- data/doc/rdoc/classes/Wee/MessageBox.html +180 -0
- data/doc/rdoc/classes/Wee/PageDecoration.html +30 -30
- data/doc/rdoc/classes/Wee/Presenter.html +237 -69
- data/doc/rdoc/classes/Wee/RedirectResponse.html +6 -6
- data/doc/rdoc/classes/Wee/RefreshResponse.html +6 -6
- data/doc/rdoc/classes/Wee/Request.html +18 -18
- data/doc/rdoc/classes/Wee/RequestHandler.html +43 -39
- data/doc/rdoc/classes/Wee/Response.html +24 -24
- data/doc/rdoc/classes/Wee/Session.html +746 -72
- data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +18 -18
- data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
- data/doc/rdoc/classes/Wee/Utils.html +138 -2
- data/doc/rdoc/classes/Wee/Utils/LRUCache.html +7 -7
- data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +43 -68
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +150 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +29 -15
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
- data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +110 -0
- data/doc/rdoc/files/lib/wee/continuation_rb.html +116 -0
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/session_rb.html +1 -2
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -8
- data/doc/rdoc/files/lib/wee/utils_rb.html +110 -0
- data/doc/rdoc/files/lib/wee_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +11 -1
- data/doc/rdoc/fr_file_index.html +8 -0
- data/doc/rdoc/fr_method_index.html +269 -228
- data/examples/calculator.rb +69 -0
- data/examples/calendar.rb +5 -17
- data/examples/example.rb +2 -2
- data/examples/hw.rb +17 -0
- data/examples/live-update.rb +45 -0
- data/examples/og-test.rb +51 -0
- data/lib/wee.rb +1 -1
- data/lib/wee/adaptors/webrick.rb +2 -0
- data/lib/wee/application.rb +16 -0
- data/lib/wee/components.rb +3 -0
- data/lib/wee/components/form_decoration.rb +7 -0
- data/{test → lib/wee}/components/messagebox.rb +1 -1
- data/lib/wee/components/page_decoration.rb +5 -5
- data/lib/wee/components/wrapper_decoration.rb +7 -0
- data/lib/wee/continuation.rb +5 -0
- data/lib/wee/continuation/core/component.rb +55 -0
- data/lib/wee/continuation/session.rb +217 -0
- data/lib/wee/core/callback.rb +11 -6
- data/lib/wee/core/component.rb +45 -33
- data/lib/wee/core/presenter.rb +68 -0
- data/lib/wee/databases/og.rb +114 -0
- data/lib/wee/renderer/html/brushes.rb +179 -98
- data/lib/wee/renderer/html/canvas.rb +37 -13
- data/lib/wee/renderer/html/writer.rb +34 -32
- data/lib/wee/requesthandler.rb +6 -3
- data/lib/wee/session.rb +73 -54
- data/lib/wee/utils.rb +5 -0
- data/lib/wee/utils/autoreload.rb +1 -1
- data/lib/wee/utils/cache.rb +0 -2
- data/lib/wee/utils/helper.rb +40 -8
- data/test/components/calltest-cont.rb +16 -0
- data/test/components/calltest.rb +15 -10
- data/test/stress.rb +31 -28
- data/test/stress_and_measure.rb +53 -0
- data/test/stressed_application.rb +15 -0
- data/test/test_html_writer.rb +9 -4
- metadata +236 -195
- data/benchmark/bench.sh +0 -24
@@ -86,7 +86,7 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
89
|
+
<a href="#M000108">new</a>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
@@ -108,21 +108,21 @@
|
|
108
108
|
<div id="methods">
|
109
109
|
<h3 class="section-bar">Public Class methods</h3>
|
110
110
|
|
111
|
-
<div id="method-
|
112
|
-
<a name="
|
111
|
+
<div id="method-M000108" class="method-detail">
|
112
|
+
<a name="M000108"></a>
|
113
113
|
|
114
114
|
<div class="method-heading">
|
115
|
-
<a href="#
|
115
|
+
<a href="#M000108" class="method-signature">
|
116
116
|
<span class="method-name">new</span><span class="method-args">()</span>
|
117
117
|
</a>
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div class="method-description">
|
121
121
|
<p><a class="source-toggle" href="#"
|
122
|
-
onclick="toggleCode('
|
123
|
-
<div class="method-source-code" id="
|
122
|
+
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
123
|
+
<div class="method-source-code" id="M000108-source">
|
124
124
|
<pre>
|
125
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line
|
125
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 196</span>
|
126
126
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
127
127
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-value str">'table'</span>)
|
128
128
|
<span class="ruby-keyword kw">end</span>
|
@@ -86,10 +86,8 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#M000090">readonly</a>
|
92
|
-
<a href="#M000091">with</a>
|
89
|
+
<a href="#M000104">new</a>
|
90
|
+
<a href="#M000105">with</a>
|
93
91
|
</div>
|
94
92
|
</div>
|
95
93
|
|
@@ -118,21 +116,21 @@
|
|
118
116
|
<div id="methods">
|
119
117
|
<h3 class="section-bar">Public Class methods</h3>
|
120
118
|
|
121
|
-
<div id="method-
|
122
|
-
<a name="
|
119
|
+
<div id="method-M000104" class="method-detail">
|
120
|
+
<a name="M000104"></a>
|
123
121
|
|
124
122
|
<div class="method-heading">
|
125
|
-
<a href="#
|
123
|
+
<a href="#M000104" class="method-signature">
|
126
124
|
<span class="method-name">new</span><span class="method-args">()</span>
|
127
125
|
</a>
|
128
126
|
</div>
|
129
127
|
|
130
128
|
<div class="method-description">
|
131
129
|
<p><a class="source-toggle" href="#"
|
132
|
-
onclick="toggleCode('
|
133
|
-
<div class="method-source-code" id="
|
130
|
+
onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
|
131
|
+
<div class="method-source-code" id="M000104-source">
|
134
132
|
<pre>
|
135
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line
|
133
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 303</span>
|
136
134
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
137
135
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-value str">'textarea'</span>)
|
138
136
|
<span class="ruby-keyword kw">end</span>
|
@@ -143,69 +141,21 @@
|
|
143
141
|
|
144
142
|
<h3 class="section-bar">Public Instance methods</h3>
|
145
143
|
|
146
|
-
<div id="method-
|
147
|
-
<a name="
|
144
|
+
<div id="method-M000105" class="method-detail">
|
145
|
+
<a name="M000105"></a>
|
148
146
|
|
149
147
|
<div class="method-heading">
|
150
|
-
<a href="#
|
151
|
-
<span class="method-name">disabled</span><span class="method-args">()</span>
|
152
|
-
</a>
|
153
|
-
</div>
|
154
|
-
|
155
|
-
<div class="method-description">
|
156
|
-
<p><a class="source-toggle" href="#"
|
157
|
-
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
158
|
-
<div class="method-source-code" id="M000089-source">
|
159
|
-
<pre>
|
160
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 197</span>
|
161
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disabled</span>
|
162
|
-
<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'disabled'</span>] = <span class="ruby-keyword kw">nil</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-M000090" class="method-detail">
|
171
|
-
<a name="M000090"></a>
|
172
|
-
|
173
|
-
<div class="method-heading">
|
174
|
-
<a href="#M000090" class="method-signature">
|
175
|
-
<span class="method-name">readonly</span><span class="method-args">()</span>
|
176
|
-
</a>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div class="method-description">
|
180
|
-
<p><a class="source-toggle" href="#"
|
181
|
-
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
182
|
-
<div class="method-source-code" id="M000090-source">
|
183
|
-
<pre>
|
184
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 202</span>
|
185
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readonly</span>
|
186
|
-
<span class="ruby-ivar">@attributes</span>[<span class="ruby-value str">'readonly'</span>] = <span class="ruby-keyword kw">nil</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-M000091" class="method-detail">
|
195
|
-
<a name="M000091"></a>
|
196
|
-
|
197
|
-
<div class="method-heading">
|
198
|
-
<a href="#M000091" class="method-signature">
|
148
|
+
<a href="#M000105" class="method-signature">
|
199
149
|
<span class="method-name">with</span><span class="method-args">(*args, &block)</span>
|
200
150
|
</a>
|
201
151
|
</div>
|
202
152
|
|
203
153
|
<div class="method-description">
|
204
154
|
<p><a class="source-toggle" href="#"
|
205
|
-
onclick="toggleCode('
|
206
|
-
<div class="method-source-code" id="
|
155
|
+
onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
|
156
|
+
<div class="method-source-code" id="M000105-source">
|
207
157
|
<pre>
|
208
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line
|
158
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 310</span>
|
209
159
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
210
160
|
<span class="ruby-keyword kw">super</span>
|
211
161
|
<span class="ruby-keyword kw">end</span>
|
@@ -86,7 +86,7 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
89
|
+
<a href="#M000140">new</a>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
@@ -115,21 +115,21 @@
|
|
115
115
|
<div id="methods">
|
116
116
|
<h3 class="section-bar">Public Class methods</h3>
|
117
117
|
|
118
|
-
<div id="method-
|
119
|
-
<a name="
|
118
|
+
<div id="method-M000140" class="method-detail">
|
119
|
+
<a name="M000140"></a>
|
120
120
|
|
121
121
|
<div class="method-heading">
|
122
|
-
<a href="#
|
122
|
+
<a href="#M000140" class="method-signature">
|
123
123
|
<span class="method-name">new</span><span class="method-args">()</span>
|
124
124
|
</a>
|
125
125
|
</div>
|
126
126
|
|
127
127
|
<div class="method-description">
|
128
128
|
<p><a class="source-toggle" href="#"
|
129
|
-
onclick="toggleCode('
|
130
|
-
<div class="method-source-code" id="
|
129
|
+
onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
|
130
|
+
<div class="method-source-code" id="M000140-source">
|
131
131
|
<pre>
|
132
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line
|
132
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 381</span>
|
133
133
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
134
134
|
<span class="ruby-keyword kw">super</span>
|
135
135
|
<span class="ruby-identifier">type</span>(<span class="ruby-value str">'text'</span>)
|
@@ -0,0 +1,146 @@
|
|
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: Wee::Brush::ToCallback</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">Wee::Brush::ToCallback</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
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000099">to_callback</a>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if includes -->
|
91
|
+
|
92
|
+
<div id="section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if method_list -->
|
102
|
+
<div id="methods">
|
103
|
+
<h3 class="section-bar">Private Instance methods</h3>
|
104
|
+
|
105
|
+
<div id="method-M000099" class="method-detail">
|
106
|
+
<a name="M000099"></a>
|
107
|
+
|
108
|
+
<div class="method-heading">
|
109
|
+
<a href="#M000099" class="method-signature">
|
110
|
+
<span class="method-name">to_callback</span><span class="method-args">(symbol, args, block)</span>
|
111
|
+
</a>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div class="method-description">
|
115
|
+
<p><a class="source-toggle" href="#"
|
116
|
+
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
117
|
+
<div class="method-source-code" id="M000099-source">
|
118
|
+
<pre>
|
119
|
+
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 53</span>
|
120
|
+
<span class="ruby-keyword kw">def</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>)
|
121
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">symbol</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">block</span>
|
122
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">symbol</span>
|
123
|
+
<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">LiteralMethodCallback</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
124
|
+
<span class="ruby-keyword kw">else</span>
|
125
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
126
|
+
<span class="ruby-identifier">block</span>
|
127
|
+
<span class="ruby-keyword kw">end</span>
|
128
|
+
<span class="ruby-keyword kw">end</span>
|
129
|
+
</pre>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
<div id="validator-badges">
|
142
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</body>
|
146
|
+
</html>
|
@@ -99,7 +99,7 @@ The format of the internal datastructure is:
|
|
99
99
|
<div id="contents-list">
|
100
100
|
<h3 class="section-bar">Contents</h3>
|
101
101
|
<ul>
|
102
|
-
<li><a href="#
|
102
|
+
<li><a href="#SEC00100">Friend methods for Wee::CallbackStream</a></li>
|
103
103
|
</ul>
|
104
104
|
</div>
|
105
105
|
|
@@ -107,11 +107,11 @@ The format of the internal datastructure is:
|
|
107
107
|
<h3 class="section-bar">Methods</h3>
|
108
108
|
|
109
109
|
<div class="name-list">
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
110
|
+
<a href="#M000196">all_of_type</a>
|
111
|
+
<a href="#M000195">get_callback_for</a>
|
112
|
+
<a href="#M000194">get_ids_for</a>
|
113
|
+
<a href="#M000192">new</a>
|
114
|
+
<a href="#M000193">register_for</a>
|
115
115
|
</div>
|
116
116
|
</div>
|
117
117
|
|
@@ -133,19 +133,19 @@ The format of the internal datastructure is:
|
|
133
133
|
<div id="methods">
|
134
134
|
<h3 class="section-bar">Public Class methods</h3>
|
135
135
|
|
136
|
-
<div id="method-
|
137
|
-
<a name="
|
136
|
+
<div id="method-M000192" class="method-detail">
|
137
|
+
<a name="M000192"></a>
|
138
138
|
|
139
139
|
<div class="method-heading">
|
140
|
-
<a href="#
|
140
|
+
<a href="#M000192" class="method-signature">
|
141
141
|
<span class="method-name">new</span><span class="method-args">(id_generator)</span>
|
142
142
|
</a>
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div class="method-description">
|
146
146
|
<p><a class="source-toggle" href="#"
|
147
|
-
onclick="toggleCode('
|
148
|
-
<div class="method-source-code" id="
|
147
|
+
onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
|
148
|
+
<div class="method-source-code" id="M000192-source">
|
149
149
|
<pre>
|
150
150
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 11</span>
|
151
151
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id_generator</span>)
|
@@ -160,12 +160,12 @@ The format of the internal datastructure is:
|
|
160
160
|
|
161
161
|
<h3 class="section-bar">Public Instance methods</h3>
|
162
162
|
|
163
|
-
<div id="method-
|
164
|
-
<a name="
|
163
|
+
<div id="method-M000193" class="method-detail">
|
164
|
+
<a name="M000193"></a>
|
165
165
|
|
166
166
|
<div class="method-heading">
|
167
|
-
<a href="#
|
168
|
-
<span class="method-name">register_for</span><span class="method-args">(object, type
|
167
|
+
<a href="#M000193" class="method-signature">
|
168
|
+
<span class="method-name">register_for</span><span class="method-args">(object, type, callback)</span>
|
169
169
|
</a>
|
170
170
|
</div>
|
171
171
|
|
@@ -175,11 +175,11 @@ Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> and
|
|
175
175
|
return a unique callback id.
|
176
176
|
</p>
|
177
177
|
<p><a class="source-toggle" href="#"
|
178
|
-
onclick="toggleCode('
|
179
|
-
<div class="method-source-code" id="
|
178
|
+
onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
|
179
|
+
<div class="method-source-code" id="M000193-source">
|
180
180
|
<pre>
|
181
181
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 19</span>
|
182
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span
|
182
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>)
|
183
183
|
<span class="ruby-identifier">c</span> = (<span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
|
184
184
|
<span class="ruby-identifier">o</span> = (<span class="ruby-ivar">@obj_to_id_map</span>[<span class="ruby-identifier">type</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
|
185
185
|
<span class="ruby-identifier">cid</span> = <span class="ruby-ivar">@idgen</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
|
@@ -196,7 +196,7 @@ return a unique callback id.
|
|
196
196
|
|
197
197
|
</div>
|
198
198
|
<div id="section">
|
199
|
-
<h2 class="section-title"><a name="
|
199
|
+
<h2 class="section-title"><a name="SEC00100">Friend methods for Wee::CallbackStream</a></h2>
|
200
200
|
<div class="section-comment">
|
201
201
|
|
202
202
|
</div>
|
@@ -212,22 +212,22 @@ return a unique callback id.
|
|
212
212
|
<div id="methods">
|
213
213
|
<h3 class="section-bar">Public Instance methods</h3>
|
214
214
|
|
215
|
-
<div id="method-
|
216
|
-
<a name="
|
215
|
+
<div id="method-M000196" class="method-detail">
|
216
|
+
<a name="M000196"></a>
|
217
217
|
|
218
218
|
<div class="method-heading">
|
219
|
-
<a href="#
|
220
|
-
<span class="method-name">all_of_type</span><span class="method-args">(type
|
219
|
+
<a href="#M000196" class="method-signature">
|
220
|
+
<span class="method-name">all_of_type</span><span class="method-args">(type)</span>
|
221
221
|
</a>
|
222
222
|
</div>
|
223
223
|
|
224
224
|
<div class="method-description">
|
225
225
|
<p><a class="source-toggle" href="#"
|
226
|
-
onclick="toggleCode('
|
227
|
-
<div class="method-source-code" id="
|
226
|
+
onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
|
227
|
+
<div class="method-source-code" id="M000196-source">
|
228
228
|
<pre>
|
229
229
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 49</span>
|
230
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span
|
230
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
|
231
231
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>]
|
232
232
|
<span class="ruby-identifier">c</span>
|
233
233
|
<span class="ruby-keyword kw">else</span>
|
@@ -239,22 +239,22 @@ return a unique callback id.
|
|
239
239
|
</div>
|
240
240
|
</div>
|
241
241
|
|
242
|
-
<div id="method-
|
243
|
-
<a name="
|
242
|
+
<div id="method-M000195" class="method-detail">
|
243
|
+
<a name="M000195"></a>
|
244
244
|
|
245
245
|
<div class="method-heading">
|
246
|
-
<a href="#
|
247
|
-
<span class="method-name">get_callback_for</span><span class="method-args">(id, type
|
246
|
+
<a href="#M000195" class="method-signature">
|
247
|
+
<span class="method-name">get_callback_for</span><span class="method-args">(id, type)</span>
|
248
248
|
</a>
|
249
249
|
</div>
|
250
250
|
|
251
251
|
<div class="method-description">
|
252
252
|
<p><a class="source-toggle" href="#"
|
253
|
-
onclick="toggleCode('
|
254
|
-
<div class="method-source-code" id="
|
253
|
+
onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
|
254
|
+
<div class="method-source-code" id="M000195-source">
|
255
255
|
<pre>
|
256
256
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 41</span>
|
257
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_callback_for</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">type</span
|
257
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_callback_for</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">type</span>)
|
258
258
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>]
|
259
259
|
<span class="ruby-identifier">c</span>[<span class="ruby-identifier">id</span>]
|
260
260
|
<span class="ruby-keyword kw">else</span>
|
@@ -266,22 +266,22 @@ return a unique callback id.
|
|
266
266
|
</div>
|
267
267
|
</div>
|
268
268
|
|
269
|
-
<div id="method-
|
270
|
-
<a name="
|
269
|
+
<div id="method-M000194" class="method-detail">
|
270
|
+
<a name="M000194"></a>
|
271
271
|
|
272
272
|
<div class="method-heading">
|
273
|
-
<a href="#
|
274
|
-
<span class="method-name">get_ids_for</span><span class="method-args">(object, type
|
273
|
+
<a href="#M000194" class="method-signature">
|
274
|
+
<span class="method-name">get_ids_for</span><span class="method-args">(object, type)</span>
|
275
275
|
</a>
|
276
276
|
</div>
|
277
277
|
|
278
278
|
<div class="method-description">
|
279
279
|
<p><a class="source-toggle" href="#"
|
280
|
-
onclick="toggleCode('
|
281
|
-
<div class="method-source-code" id="
|
280
|
+
onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
|
281
|
+
<div class="method-source-code" id="M000194-source">
|
282
282
|
<pre>
|
283
283
|
<span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 33</span>
|
284
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ids_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span
|
284
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ids_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>)
|
285
285
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span> = <span class="ruby-ivar">@obj_to_id_map</span>[<span class="ruby-identifier">type</span>]
|
286
286
|
<span class="ruby-identifier">o</span>[<span class="ruby-identifier">object</span>] <span class="ruby-operator">||</span> []
|
287
287
|
<span class="ruby-keyword kw">else</span>
|