wee 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +132 -0
  2. data/INSTALL +13 -3
  3. data/README +3 -3
  4. data/Rakefile +5 -1
  5. data/bin/wee +100 -0
  6. data/doc/rdoc/classes/Array.html +12 -12
  7. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  8. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  9. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  11. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  12. data/doc/rdoc/classes/Enumerable.html +6 -6
  13. data/doc/rdoc/classes/Main.html +265 -0
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgApplication.html +2 -2
  16. data/doc/rdoc/classes/OgScaffolder.html +444 -64
  17. data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
  18. data/doc/rdoc/classes/OgSession.html +4 -4
  19. data/doc/rdoc/classes/Recipe.html +113 -0
  20. data/doc/rdoc/classes/String.html +12 -12
  21. data/doc/rdoc/classes/Struct.html +12 -12
  22. data/doc/rdoc/classes/Wee.html +10 -1
  23. data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
  24. data/doc/rdoc/classes/Wee/Application.html +48 -47
  25. data/doc/rdoc/classes/Wee/Brush.html +19 -23
  26. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
  27. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
  28. data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
  29. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  30. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  31. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
  32. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
  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/SelectListTag.html +33 -57
  39. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  41. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
  42. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  43. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  45. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
  47. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
  48. data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
  49. data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
  50. data/doc/rdoc/classes/Wee/Canvas.html +24 -24
  51. data/doc/rdoc/classes/Wee/Component.html +179 -151
  52. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
  53. data/doc/rdoc/classes/Wee/Decoration.html +42 -42
  54. data/doc/rdoc/classes/Wee/Delegate.html +27 -27
  55. data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
  56. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  57. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  58. data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
  59. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  60. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
  61. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
  62. data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  64. data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
  65. data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
  66. data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
  67. data/doc/rdoc/classes/Wee/Presenter.html +145 -89
  68. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  69. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/Request.html +116 -50
  71. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  72. data/doc/rdoc/classes/Wee/Response.html +76 -28
  73. data/doc/rdoc/classes/Wee/Session.html +129 -506
  74. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
  75. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  76. data/doc/rdoc/classes/Wee/Utils.html +70 -17
  77. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  78. data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
  79. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/INSTALL.html +17 -5
  83. data/doc/rdoc/files/README.html +9 -11
  84. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  85. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  86. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  87. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
  88. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  89. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  90. data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
  91. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
  92. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
  93. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
  94. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
  95. data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
  96. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
  97. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
  98. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
  99. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
  100. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
  101. data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
  102. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  103. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
  104. data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
  105. data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
  106. data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
  107. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
  108. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
  109. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
  110. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
  111. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
  112. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
  113. data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
  114. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  115. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  116. data/doc/rdoc/files/lib/wee_rb.html +4 -2
  117. data/doc/rdoc/fr_class_index.html +8 -4
  118. data/doc/rdoc/fr_file_index.html +17 -1
  119. data/doc/rdoc/fr_method_index.html +312 -267
  120. data/examples/live-update.rb +1 -1
  121. data/install.rb +14 -0
  122. data/lib/wee.rb +6 -2
  123. data/lib/wee/adaptors/webrick.rb +17 -5
  124. data/lib/wee/application.rb +2 -1
  125. data/lib/wee/continuation/session.rb +1 -146
  126. data/lib/wee/core/callback.rb +11 -5
  127. data/lib/wee/core/component.rb +14 -10
  128. data/lib/wee/databases/og.rb +3 -113
  129. data/lib/wee/databases/og/application.rb +3 -0
  130. data/lib/wee/databases/og/old_scaffolder.rb +98 -0
  131. data/lib/wee/databases/og/scaffolder.rb +174 -0
  132. data/lib/wee/databases/og/session.rb +9 -0
  133. data/lib/wee/idgen/md5.rb +21 -0
  134. data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
  135. data/lib/wee/pageless.rb +3 -0
  136. data/lib/wee/pageless/application.rb +9 -0
  137. data/lib/wee/pageless/request.rb +15 -0
  138. data/lib/wee/pageless/session.rb +89 -0
  139. data/lib/wee/renderer/html/brushes.rb +100 -115
  140. data/lib/wee/renderer/html/canvas.rb +32 -2
  141. data/lib/wee/request.rb +36 -24
  142. data/lib/wee/response.rb +8 -1
  143. data/lib/wee/session.rb +13 -7
  144. data/lib/wee/skeleton/og/README +38 -0
  145. data/lib/wee/skeleton/og/components/main.rb +16 -0
  146. data/lib/wee/skeleton/og/conf/db.rb +8 -0
  147. data/lib/wee/skeleton/og/models/recipe.rb +5 -0
  148. data/lib/wee/skeleton/og/run.rb +23 -0
  149. data/lib/wee/skeleton/simple/README +32 -0
  150. data/lib/wee/skeleton/simple/components/main.rb +25 -0
  151. data/lib/wee/skeleton/simple/run.rb +12 -0
  152. data/lib/wee/template.rb +28 -0
  153. data/lib/wee/utils/autoreload.rb +29 -0
  154. data/lib/wee/utils/helper.rb +9 -5
  155. data/test/test_request.rb +4 -3
  156. data/wee.gemspec +3 -1
  157. metadata +91 -22
@@ -86,7 +86,7 @@ for Ruby 1.8
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000269">min_by</a>&nbsp;&nbsp;
89
+ <a href="#M000314">min_by</a>&nbsp;&nbsp;
90
90
  </div>
91
91
  </div>
92
92
 
@@ -108,19 +108,19 @@ for Ruby 1.8
108
108
  <div id="methods">
109
109
  <h3 class="section-bar">Public Instance methods</h3>
110
110
 
111
- <div id="method-M000269" class="method-detail">
112
- <a name="M000269"></a>
111
+ <div id="method-M000314" class="method-detail">
112
+ <a name="M000314"></a>
113
113
 
114
114
  <div class="method-heading">
115
- <a href="#M000269" class="method-signature">
115
+ <a href="#M000314" class="method-signature">
116
116
  <span class="method-name">min_by</span><span class="method-args">(&amp;block)</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('M000269-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000269-source">
122
+ onclick="toggleCode('M000314-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000314-source">
124
124
  <pre>
125
125
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 4</span>
126
126
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">min_by</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -0,0 +1,265 @@
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: Main</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">Main</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/wee/skeleton/simple/components/main_rb.html">
59
+ lib/wee/skeleton/simple/components/main.rb
60
+ </a>
61
+ <br />
62
+ <a href="../files/lib/wee/skeleton/og/components/main_rb.html">
63
+ lib/wee/skeleton/og/components/main.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ <tr class="top-aligned-row">
70
+ <td><strong>Parent:</strong></td>
71
+ <td>
72
+ <a href="Wee/Component.html">
73
+ Wee::Component
74
+ </a>
75
+ </td>
76
+ </tr>
77
+ </table>
78
+ </div>
79
+ <!-- banner header -->
80
+
81
+ <div id="bodyContent">
82
+
83
+
84
+
85
+ <div id="contextContent">
86
+
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000005">click</a>&nbsp;&nbsp;
96
+ <a href="#M000003">new</a>&nbsp;&nbsp;
97
+ <a href="#M000006">new</a>&nbsp;&nbsp;
98
+ <a href="#M000004">render</a>&nbsp;&nbsp;
99
+ <a href="#M000007">render</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+ <div id="methods">
119
+ <h3 class="section-bar">Public Class methods</h3>
120
+
121
+ <div id="method-M000003" class="method-detail">
122
+ <a name="M000003"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="#M000003" class="method-signature">
126
+ <span class="method-name">new</span><span class="method-args">()</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000003-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File lib/wee/skeleton/simple/components/main.rb, line 3</span>
136
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
137
+ <span class="ruby-keyword kw">super</span>()
138
+ <span class="ruby-comment cmt"># Put your own initialization code below...</span>
139
+ <span class="ruby-keyword kw">end</span>
140
+ </pre>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div id="method-M000006" class="method-detail">
146
+ <a name="M000006"></a>
147
+
148
+ <div class="method-heading">
149
+ <a href="#M000006" class="method-signature">
150
+ <span class="method-name">new</span><span class="method-args">()</span>
151
+ </a>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+ <p><a class="source-toggle" href="#"
156
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
157
+ <div class="method-source-code" id="M000006-source">
158
+ <pre>
159
+ <span class="ruby-comment cmt"># File lib/wee/skeleton/og/components/main.rb, line 3</span>
160
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
161
+ <span class="ruby-keyword kw">super</span>()
162
+ <span class="ruby-ivar">@scaffolder</span> = <span class="ruby-identifier">add_child</span> <span class="ruby-constant">OgScaffolder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Recipe</span>)
163
+ <span class="ruby-keyword kw">end</span>
164
+ </pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+ <h3 class="section-bar">Public Instance methods</h3>
170
+
171
+ <div id="method-M000005" class="method-detail">
172
+ <a name="M000005"></a>
173
+
174
+ <div class="method-heading">
175
+ <a href="#M000005" class="method-signature">
176
+ <span class="method-name">click</span><span class="method-args">()</span>
177
+ </a>
178
+ </div>
179
+
180
+ <div class="method-description">
181
+ <hr size="10"></hr><p>
182
+ Actions
183
+ </p>
184
+ <hr size="10"></hr>
185
+ <p><a class="source-toggle" href="#"
186
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
187
+ <div class="method-source-code" id="M000005-source">
188
+ <pre>
189
+ <span class="ruby-comment cmt"># File lib/wee/skeleton/simple/components/main.rb, line 21</span>
190
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">click</span>
191
+ <span class="ruby-ivar">@clicks</span> = (<span class="ruby-ivar">@clicks</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
192
+ <span class="ruby-keyword kw">end</span>
193
+ </pre>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <div id="method-M000004" class="method-detail">
199
+ <a name="M000004"></a>
200
+
201
+ <div class="method-heading">
202
+ <a href="#M000004" class="method-signature">
203
+ <span class="method-name">render</span><span class="method-args">()</span>
204
+ </a>
205
+ </div>
206
+
207
+ <div class="method-description">
208
+ <hr size="10"></hr><p>
209
+ Rendering
210
+ </p>
211
+ <hr size="10"></hr>
212
+ <p><a class="source-toggle" href="#"
213
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
214
+ <div class="method-source-code" id="M000004-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/wee/skeleton/simple/components/main.rb, line 12</span>
217
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
218
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:click</span>).<span class="ruby-identifier">with</span> { <span class="ruby-identifier">r</span>.<span class="ruby-identifier">h1</span>(<span class="ruby-value str">&quot;Welcome to Wee!&quot;</span>) }
219
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text</span> <span class="ruby-node">&quot;#{ @clicks || 'No' } clicks&quot;</span>
220
+ <span class="ruby-keyword kw">end</span>
221
+ </pre>
222
+ </div>
223
+ </div>
224
+ </div>
225
+
226
+ <div id="method-M000007" class="method-detail">
227
+ <a name="M000007"></a>
228
+
229
+ <div class="method-heading">
230
+ <a href="#M000007" class="method-signature">
231
+ <span class="method-name">render</span><span class="method-args">()</span>
232
+ </a>
233
+ </div>
234
+
235
+ <div class="method-description">
236
+ <hr size="10"></hr><p>
237
+ Rendering
238
+ </p>
239
+ <hr size="10"></hr>
240
+ <p><a class="source-toggle" href="#"
241
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
242
+ <div class="method-source-code" id="M000007-source">
243
+ <pre>
244
+ <span class="ruby-comment cmt"># File lib/wee/skeleton/og/components/main.rb, line 12</span>
245
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
246
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">render</span> <span class="ruby-ivar">@scaffolder</span>
247
+ <span class="ruby-keyword kw">end</span>
248
+ </pre>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+
254
+ </div>
255
+
256
+
257
+ </div>
258
+
259
+
260
+ <div id="validator-badges">
261
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
262
+ </div>
263
+
264
+ </body>
265
+ </html>
@@ -88,8 +88,8 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000041">restore_snapshot</a>&nbsp;&nbsp;
92
- <a href="#M000040">take_snapshot</a>&nbsp;&nbsp;
91
+ <a href="#M000074">restore_snapshot</a>&nbsp;&nbsp;
92
+ <a href="#M000073">take_snapshot</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,19 +111,19 @@
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Instance methods</h3>
113
113
 
114
- <div id="method-M000041" class="method-detail">
115
- <a name="M000041"></a>
114
+ <div id="method-M000074" class="method-detail">
115
+ <a name="M000074"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="#M000041" class="method-signature">
118
+ <a href="#M000074" class="method-signature">
119
119
  <span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
120
120
  </a>
121
121
  </div>
122
122
 
123
123
  <div class="method-description">
124
124
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000041-source">
125
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000074-source">
127
127
  <pre>
128
128
  <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 10</span>
129
129
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
@@ -136,19 +136,19 @@
136
136
  </div>
137
137
  </div>
138
138
 
139
- <div id="method-M000040" class="method-detail">
140
- <a name="M000040"></a>
139
+ <div id="method-M000073" class="method-detail">
140
+ <a name="M000073"></a>
141
141
 
142
142
  <div class="method-heading">
143
- <a href="#M000040" class="method-signature">
143
+ <a href="#M000073" class="method-signature">
144
144
  <span class="method-name">take_snapshot</span><span class="method-args">()</span>
145
145
  </a>
146
146
  </div>
147
147
 
148
148
  <div class="method-description">
149
149
  <p><a class="source-toggle" href="#"
150
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
151
- <div class="method-source-code" id="M000040-source">
150
+ onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
151
+ <div class="method-source-code" id="M000073-source">
152
152
  <pre>
153
153
  <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 2</span>
154
154
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
@@ -55,8 +55,8 @@
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/lib/wee/databases/og_rb.html">
59
- lib/wee/databases/og.rb
58
+ <a href="../files/lib/wee/databases/og/application_rb.html">
59
+ lib/wee/databases/og/application.rb
60
60
  </a>
61
61
  <br />
62
62
  </td>
@@ -55,8 +55,12 @@
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/lib/wee/databases/og_rb.html">
59
- lib/wee/databases/og.rb
58
+ <a href="../files/lib/wee/databases/og/old_scaffolder_rb.html">
59
+ lib/wee/databases/og/old_scaffolder.rb
60
+ </a>
61
+ <br />
62
+ <a href="../files/lib/wee/databases/og/scaffolder_rb.html">
63
+ lib/wee/databases/og/scaffolder.rb
60
64
  </a>
61
65
  <br />
62
66
  </td>
@@ -80,6 +84,13 @@
80
84
 
81
85
  <div id="contextContent">
82
86
 
87
+ <div id="description">
88
+ <p>
89
+ This is a Rails-like scaffolder for use with Og (<a
90
+ href="http://navel.gr/nitro">navel.gr/nitro</a>) domain objects.
91
+ </p>
92
+
93
+ </div>
83
94
 
84
95
 
85
96
  </div>
@@ -88,15 +99,29 @@
88
99
  <h3 class="section-bar">Methods</h3>
89
100
 
90
101
  <div class="name-list">
91
- <a href="#M000036">cancel</a>&nbsp;&nbsp;
92
- <a href="#M000033">confirm_delete</a>&nbsp;&nbsp;
93
- <a href="#M000038">create</a>&nbsp;&nbsp;
94
- <a href="#M000032">delete</a>&nbsp;&nbsp;
95
- <a href="#M000034">edit</a>&nbsp;&nbsp;
96
- <a href="#M000031">new</a>&nbsp;&nbsp;
97
- <a href="#M000037">refresh</a>&nbsp;&nbsp;
98
- <a href="#M000039">render</a>&nbsp;&nbsp;
99
- <a href="#M000035">save</a>&nbsp;&nbsp;
102
+ <a href="#M000055">add</a>&nbsp;&nbsp;
103
+ <a href="#M000041">cancel</a>&nbsp;&nbsp;
104
+ <a href="#M000038">confirm_delete</a>&nbsp;&nbsp;
105
+ <a href="#M000057">confirm_destroy</a>&nbsp;&nbsp;
106
+ <a href="#M000043">create</a>&nbsp;&nbsp;
107
+ <a href="#M000037">delete</a>&nbsp;&nbsp;
108
+ <a href="#M000056">destroy</a>&nbsp;&nbsp;
109
+ <a href="#M000058">domain_objects</a>&nbsp;&nbsp;
110
+ <a href="#M000039">edit</a>&nbsp;&nbsp;
111
+ <a href="#M000054">edit</a>&nbsp;&nbsp;
112
+ <a href="#M000045">new</a>&nbsp;&nbsp;
113
+ <a href="#M000036">new</a>&nbsp;&nbsp;
114
+ <a href="#M000042">refresh</a>&nbsp;&nbsp;
115
+ <a href="#M000046">render</a>&nbsp;&nbsp;
116
+ <a href="#M000044">render</a>&nbsp;&nbsp;
117
+ <a href="#M000052">render_action</a>&nbsp;&nbsp;
118
+ <a href="#M000048">render_action_header</a>&nbsp;&nbsp;
119
+ <a href="#M000050">render_body</a>&nbsp;&nbsp;
120
+ <a href="#M000047">render_header</a>&nbsp;&nbsp;
121
+ <a href="#M000051">render_object</a>&nbsp;&nbsp;
122
+ <a href="#M000053">render_property</a>&nbsp;&nbsp;
123
+ <a href="#M000049">render_property_header</a>&nbsp;&nbsp;
124
+ <a href="#M000040">save</a>&nbsp;&nbsp;
100
125
  </div>
101
126
  </div>
102
127
 
@@ -107,6 +132,12 @@
107
132
 
108
133
  <div id="section">
109
134
 
135
+ <div id="class-list">
136
+ <h3 class="section-bar">Classes and Modules</h3>
137
+
138
+ Class <a href="OgScaffolder/Editor.html" class="link">OgScaffolder::Editor</a><br />
139
+
140
+ </div>
110
141
 
111
142
 
112
143
 
@@ -118,39 +149,38 @@
118
149
  <div id="methods">
119
150
  <h3 class="section-bar">Public Class methods</h3>
120
151
 
121
- <div id="method-M000031" class="method-detail">
122
- <a name="M000031"></a>
152
+ <div id="method-M000045" class="method-detail">
153
+ <a name="M000045"></a>
123
154
 
124
155
  <div class="method-heading">
125
- <a href="#M000031" class="method-signature">
156
+ <a href="#M000045" class="method-signature">
126
157
  <span class="method-name">new</span><span class="method-args">(domain_class)</span>
127
158
  </a>
128
159
  </div>
129
160
 
130
161
  <div class="method-description">
131
162
  <p><a class="source-toggle" href="#"
132
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
133
- <div class="method-source-code" id="M000031-source">
163
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
164
+ <div class="method-source-code" id="M000045-source">
134
165
  <pre>
135
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 18</span>
166
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 5</span>
136
167
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain_class</span>)
137
168
  <span class="ruby-keyword kw">super</span>()
138
169
  <span class="ruby-ivar">@domain_class</span> = <span class="ruby-identifier">domain_class</span>
139
- <span class="ruby-ivar">@attributes</span> = <span class="ruby-identifier">domain_class</span>.<span class="ruby-identifier">__props</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span>}.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'oid'</span>}
170
+ <span class="ruby-comment cmt"># DON'T use @properties here as it is already used by Wee</span>
171
+ <span class="ruby-ivar">@props</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">__props</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'oid'</span>}
140
172
  <span class="ruby-keyword kw">end</span>
141
173
  </pre>
142
174
  </div>
143
175
  </div>
144
176
  </div>
145
177
 
146
- <h3 class="section-bar">Public Instance methods</h3>
147
-
148
178
  <div id="method-M000036" class="method-detail">
149
179
  <a name="M000036"></a>
150
180
 
151
181
  <div class="method-heading">
152
182
  <a href="#M000036" class="method-signature">
153
- <span class="method-name">cancel</span><span class="method-args">()</span>
183
+ <span class="method-name">new</span><span class="method-args">(domain_class)</span>
154
184
  </a>
155
185
  </div>
156
186
 
@@ -159,7 +189,58 @@
159
189
  onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
160
190
  <div class="method-source-code" id="M000036-source">
161
191
  <pre>
162
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 44</span>
192
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 3</span>
193
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain_class</span>)
194
+ <span class="ruby-keyword kw">super</span>()
195
+ <span class="ruby-ivar">@domain_class</span> = <span class="ruby-identifier">domain_class</span>
196
+ <span class="ruby-ivar">@attributes</span> = <span class="ruby-identifier">domain_class</span>.<span class="ruby-identifier">__props</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span>}.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'oid'</span>}
197
+ <span class="ruby-keyword kw">end</span>
198
+ </pre>
199
+ </div>
200
+ </div>
201
+ </div>
202
+
203
+ <h3 class="section-bar">Public Instance methods</h3>
204
+
205
+ <div id="method-M000055" class="method-detail">
206
+ <a name="M000055"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="#M000055" class="method-signature">
210
+ <span class="method-name">add</span><span class="method-args">()</span>
211
+ </a>
212
+ </div>
213
+
214
+ <div class="method-description">
215
+ <p><a class="source-toggle" href="#"
216
+ onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
217
+ <div class="method-source-code" id="M000055-source">
218
+ <pre>
219
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 70</span>
220
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>
221
+ <span class="ruby-identifier">call</span> <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">new</span>, <span class="ruby-value str">&quot;Create&quot;</span>).
222
+ <span class="ruby-identifier">add_decoration</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">FormDecoration</span>.<span class="ruby-identifier">new</span>)
223
+ <span class="ruby-keyword kw">end</span>
224
+ </pre>
225
+ </div>
226
+ </div>
227
+ </div>
228
+
229
+ <div id="method-M000041" class="method-detail">
230
+ <a name="M000041"></a>
231
+
232
+ <div class="method-heading">
233
+ <a href="#M000041" class="method-signature">
234
+ <span class="method-name">cancel</span><span class="method-args">()</span>
235
+ </a>
236
+ </div>
237
+
238
+ <div class="method-description">
239
+ <p><a class="source-toggle" href="#"
240
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
241
+ <div class="method-source-code" id="M000041-source">
242
+ <pre>
243
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 29</span>
163
244
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancel</span>
164
245
  <span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@edit</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@edit</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@edit</span>.<span class="ruby-identifier">oid</span>.<span class="ruby-identifier">nil?</span>
165
246
  <span class="ruby-ivar">@edit</span> = <span class="ruby-keyword kw">nil</span>
@@ -169,21 +250,21 @@
169
250
  </div>
170
251
  </div>
171
252
 
172
- <div id="method-M000033" class="method-detail">
173
- <a name="M000033"></a>
253
+ <div id="method-M000038" class="method-detail">
254
+ <a name="M000038"></a>
174
255
 
175
256
  <div class="method-heading">
176
- <a href="#M000033" class="method-signature">
257
+ <a href="#M000038" class="method-signature">
177
258
  <span class="method-name">confirm_delete</span><span class="method-args">(confirmed, obj)</span>
178
259
  </a>
179
260
  </div>
180
261
 
181
262
  <div class="method-description">
182
263
  <p><a class="source-toggle" href="#"
183
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
184
- <div class="method-source-code" id="M000033-source">
264
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
265
+ <div class="method-source-code" id="M000038-source">
185
266
  <pre>
186
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 28</span>
267
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 13</span>
187
268
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">confirm_delete</span>(<span class="ruby-identifier">confirmed</span>, <span class="ruby-identifier">obj</span>)
188
269
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">confirmed</span>
189
270
  <span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">obj</span>)
@@ -195,21 +276,44 @@
195
276
  </div>
196
277
  </div>
197
278
 
198
- <div id="method-M000038" class="method-detail">
199
- <a name="M000038"></a>
279
+ <div id="method-M000057" class="method-detail">
280
+ <a name="M000057"></a>
200
281
 
201
282
  <div class="method-heading">
202
- <a href="#M000038" class="method-signature">
283
+ <a href="#M000057" class="method-signature">
284
+ <span class="method-name">confirm_destroy</span><span class="method-args">(obj, confirmed)</span>
285
+ </a>
286
+ </div>
287
+
288
+ <div class="method-description">
289
+ <p><a class="source-toggle" href="#"
290
+ onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
291
+ <div class="method-source-code" id="M000057-source">
292
+ <pre>
293
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 80</span>
294
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">confirm_destroy</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">confirmed</span>)
295
+ <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">delete!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">confirmed</span>
296
+ <span class="ruby-keyword kw">end</span>
297
+ </pre>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+ <div id="method-M000043" class="method-detail">
303
+ <a name="M000043"></a>
304
+
305
+ <div class="method-heading">
306
+ <a href="#M000043" class="method-signature">
203
307
  <span class="method-name">create</span><span class="method-args">()</span>
204
308
  </a>
205
309
  </div>
206
310
 
207
311
  <div class="method-description">
208
312
  <p><a class="source-toggle" href="#"
209
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
210
- <div class="method-source-code" id="M000038-source">
313
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
314
+ <div class="method-source-code" id="M000043-source">
211
315
  <pre>
212
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 53</span>
316
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 38</span>
213
317
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>
214
318
  <span class="ruby-ivar">@objs</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-ivar">@edit</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">new</span>)
215
319
  <span class="ruby-keyword kw">end</span>
@@ -218,21 +322,21 @@
218
322
  </div>
219
323
  </div>
220
324
 
221
- <div id="method-M000032" class="method-detail">
222
- <a name="M000032"></a>
325
+ <div id="method-M000037" class="method-detail">
326
+ <a name="M000037"></a>
223
327
 
224
328
  <div class="method-heading">
225
- <a href="#M000032" class="method-signature">
329
+ <a href="#M000037" class="method-signature">
226
330
  <span class="method-name">delete</span><span class="method-args">(obj)</span>
227
331
  </a>
228
332
  </div>
229
333
 
230
334
  <div class="method-description">
231
335
  <p><a class="source-toggle" href="#"
232
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
233
- <div class="method-source-code" id="M000032-source">
336
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
337
+ <div class="method-source-code" id="M000037-source">
234
338
  <pre>
235
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 24</span>
339
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 9</span>
236
340
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">obj</span>)
237
341
  <span class="ruby-identifier">call</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Really delete?'</span>), <span class="ruby-identifier">:confirm_delete</span>, <span class="ruby-identifier">obj</span>
238
342
  <span class="ruby-keyword kw">end</span>
@@ -241,21 +345,68 @@
241
345
  </div>
242
346
  </div>
243
347
 
244
- <div id="method-M000034" class="method-detail">
245
- <a name="M000034"></a>
348
+ <div id="method-M000056" class="method-detail">
349
+ <a name="M000056"></a>
350
+
351
+ <div class="method-heading">
352
+ <a href="#M000056" class="method-signature">
353
+ <span class="method-name">destroy</span><span class="method-args">(obj)</span>
354
+ </a>
355
+ </div>
356
+
357
+ <div class="method-description">
358
+ <p><a class="source-toggle" href="#"
359
+ onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
360
+ <div class="method-source-code" id="M000056-source">
361
+ <pre>
362
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 75</span>
363
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">obj</span>)
364
+ <span class="ruby-identifier">call</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Do you really want to destroy the object?'</span>),
365
+ <span class="ruby-identifier">:confirm_destroy</span>, <span class="ruby-identifier">obj</span>
366
+ <span class="ruby-keyword kw">end</span>
367
+ </pre>
368
+ </div>
369
+ </div>
370
+ </div>
371
+
372
+ <div id="method-M000058" class="method-detail">
373
+ <a name="M000058"></a>
374
+
375
+ <div class="method-heading">
376
+ <a href="#M000058" class="method-signature">
377
+ <span class="method-name">domain_objects</span><span class="method-args">()</span>
378
+ </a>
379
+ </div>
380
+
381
+ <div class="method-description">
382
+ <p><a class="source-toggle" href="#"
383
+ onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
384
+ <div class="method-source-code" id="M000058-source">
385
+ <pre>
386
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 84</span>
387
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_objects</span>
388
+ <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">all</span> <span class="ruby-operator">||</span> []
389
+ <span class="ruby-keyword kw">end</span>
390
+ </pre>
391
+ </div>
392
+ </div>
393
+ </div>
394
+
395
+ <div id="method-M000039" class="method-detail">
396
+ <a name="M000039"></a>
246
397
 
247
398
  <div class="method-heading">
248
- <a href="#M000034" class="method-signature">
399
+ <a href="#M000039" class="method-signature">
249
400
  <span class="method-name">edit</span><span class="method-args">(obj)</span>
250
401
  </a>
251
402
  </div>
252
403
 
253
404
  <div class="method-description">
254
405
  <p><a class="source-toggle" href="#"
255
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
256
- <div class="method-source-code" id="M000034-source">
406
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
407
+ <div class="method-source-code" id="M000039-source">
257
408
  <pre>
258
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 35</span>
409
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 20</span>
259
410
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">obj</span>)
260
411
  <span class="ruby-ivar">@edit</span> = <span class="ruby-identifier">obj</span>
261
412
  <span class="ruby-keyword kw">end</span>
@@ -264,21 +415,44 @@
264
415
  </div>
265
416
  </div>
266
417
 
267
- <div id="method-M000037" class="method-detail">
268
- <a name="M000037"></a>
418
+ <div id="method-M000054" class="method-detail">
419
+ <a name="M000054"></a>
269
420
 
270
421
  <div class="method-heading">
271
- <a href="#M000037" class="method-signature">
422
+ <a href="#M000054" class="method-signature">
423
+ <span class="method-name">edit</span><span class="method-args">(obj)</span>
424
+ </a>
425
+ </div>
426
+
427
+ <div class="method-description">
428
+ <p><a class="source-toggle" href="#"
429
+ onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
430
+ <div class="method-source-code" id="M000054-source">
431
+ <pre>
432
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 66</span>
433
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">obj</span>)
434
+ <span class="ruby-identifier">call</span> <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">obj</span>).<span class="ruby-identifier">add_decoration</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">FormDecoration</span>.<span class="ruby-identifier">new</span>)
435
+ <span class="ruby-keyword kw">end</span>
436
+ </pre>
437
+ </div>
438
+ </div>
439
+ </div>
440
+
441
+ <div id="method-M000042" class="method-detail">
442
+ <a name="M000042"></a>
443
+
444
+ <div class="method-heading">
445
+ <a href="#M000042" class="method-signature">
272
446
  <span class="method-name">refresh</span><span class="method-args">()</span>
273
447
  </a>
274
448
  </div>
275
449
 
276
450
  <div class="method-description">
277
451
  <p><a class="source-toggle" href="#"
278
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
279
- <div class="method-source-code" id="M000037-source">
452
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
453
+ <div class="method-source-code" id="M000042-source">
280
454
  <pre>
281
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 49</span>
455
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 34</span>
282
456
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">refresh</span>
283
457
  <span class="ruby-ivar">@objs</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">all</span> <span class="ruby-operator">||</span> []
284
458
  <span class="ruby-keyword kw">end</span>
@@ -287,21 +461,51 @@
287
461
  </div>
288
462
  </div>
289
463
 
290
- <div id="method-M000039" class="method-detail">
291
- <a name="M000039"></a>
464
+ <div id="method-M000046" class="method-detail">
465
+ <a name="M000046"></a>
292
466
 
293
467
  <div class="method-heading">
294
- <a href="#M000039" class="method-signature">
468
+ <a href="#M000046" class="method-signature">
295
469
  <span class="method-name">render</span><span class="method-args">()</span>
296
470
  </a>
297
471
  </div>
298
472
 
299
473
  <div class="method-description">
300
474
  <p><a class="source-toggle" href="#"
301
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
302
- <div class="method-source-code" id="M000039-source">
475
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
476
+ <div class="method-source-code" id="M000046-source">
477
+ <pre>
478
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 12</span>
479
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
480
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">h1</span> <span class="ruby-node">&quot;List #{ @domain_class }&quot;</span>
481
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
482
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table</span>.<span class="ruby-identifier">border</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">with</span> {
483
+ <span class="ruby-identifier">render_header</span>
484
+ <span class="ruby-identifier">render_body</span>
485
+ }
486
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
487
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:add</span>).<span class="ruby-identifier">with</span>(<span class="ruby-node">&quot;Add new #{ @domain_class }&quot;</span>)
488
+ <span class="ruby-keyword kw">end</span>
489
+ </pre>
490
+ </div>
491
+ </div>
492
+ </div>
493
+
494
+ <div id="method-M000044" class="method-detail">
495
+ <a name="M000044"></a>
496
+
497
+ <div class="method-heading">
498
+ <a href="#M000044" class="method-signature">
499
+ <span class="method-name">render</span><span class="method-args">()</span>
500
+ </a>
501
+ </div>
502
+
503
+ <div class="method-description">
504
+ <p><a class="source-toggle" href="#"
505
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
506
+ <div class="method-source-code" id="M000044-source">
303
507
  <pre>
304
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 57</span>
508
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 42</span>
305
509
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
306
510
  <span class="ruby-identifier">refresh</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">nil?</span>
307
511
 
@@ -362,21 +566,197 @@
362
566
  </div>
363
567
  </div>
364
568
 
365
- <div id="method-M000035" class="method-detail">
366
- <a name="M000035"></a>
569
+ <div id="method-M000052" class="method-detail">
570
+ <a name="M000052"></a>
571
+
572
+ <div class="method-heading">
573
+ <a href="#M000052" class="method-signature">
574
+ <span class="method-name">render_action</span><span class="method-args">(obj)</span>
575
+ </a>
576
+ </div>
577
+
578
+ <div class="method-description">
579
+ <p><a class="source-toggle" href="#"
580
+ onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
581
+ <div class="method-source-code" id="M000052-source">
582
+ <pre>
583
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 54</span>
584
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_action</span>(<span class="ruby-identifier">obj</span>)
585
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>.<span class="ruby-identifier">with</span> {
586
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:edit</span>, <span class="ruby-identifier">obj</span>).<span class="ruby-identifier">with</span>(<span class="ruby-value str">&quot;Edit&quot;</span>)
587
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
588
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:destroy</span>, <span class="ruby-identifier">obj</span>).<span class="ruby-identifier">with</span>(<span class="ruby-value str">&quot;Destroy&quot;</span>)
589
+ }
590
+ <span class="ruby-keyword kw">end</span>
591
+ </pre>
592
+ </div>
593
+ </div>
594
+ </div>
595
+
596
+ <div id="method-M000048" class="method-detail">
597
+ <a name="M000048"></a>
598
+
599
+ <div class="method-heading">
600
+ <a href="#M000048" class="method-signature">
601
+ <span class="method-name">render_action_header</span><span class="method-args">()</span>
602
+ </a>
603
+ </div>
604
+
605
+ <div class="method-description">
606
+ <p><a class="source-toggle" href="#"
607
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
608
+ <div class="method-source-code" id="M000048-source">
609
+ <pre>
610
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 32</span>
611
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_action_header</span>
612
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
613
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span> { <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>) } <span class="ruby-comment cmt"># the action column</span>
614
+ <span class="ruby-keyword kw">end</span>
615
+ </pre>
616
+ </div>
617
+ </div>
618
+ </div>
619
+
620
+ <div id="method-M000050" class="method-detail">
621
+ <a name="M000050"></a>
622
+
623
+ <div class="method-heading">
624
+ <a href="#M000050" class="method-signature">
625
+ <span class="method-name">render_body</span><span class="method-args">()</span>
626
+ </a>
627
+ </div>
628
+
629
+ <div class="method-description">
630
+ <p><a class="source-toggle" href="#"
631
+ onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
632
+ <div class="method-source-code" id="M000050-source">
633
+ <pre>
634
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 43</span>
635
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_body</span>
636
+ <span class="ruby-identifier">domain_objects</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> <span class="ruby-identifier">render_object</span>(<span class="ruby-identifier">obj</span>) }
637
+ <span class="ruby-keyword kw">end</span>
638
+ </pre>
639
+ </div>
640
+ </div>
641
+ </div>
642
+
643
+ <div id="method-M000047" class="method-detail">
644
+ <a name="M000047"></a>
645
+
646
+ <div class="method-heading">
647
+ <a href="#M000047" class="method-signature">
648
+ <span class="method-name">render_header</span><span class="method-args">()</span>
649
+ </a>
650
+ </div>
651
+
652
+ <div class="method-description">
653
+ <p><a class="source-toggle" href="#"
654
+ onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
655
+ <div class="method-source-code" id="M000047-source">
656
+ <pre>
657
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 23</span>
658
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_header</span>
659
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span>.<span class="ruby-identifier">with</span> {
660
+ <span class="ruby-ivar">@props</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
661
+ <span class="ruby-identifier">render_property_header</span>(<span class="ruby-identifier">prop</span>)
662
+ }
663
+ <span class="ruby-identifier">render_action_header</span>
664
+ }
665
+ <span class="ruby-keyword kw">end</span>
666
+ </pre>
667
+ </div>
668
+ </div>
669
+ </div>
670
+
671
+ <div id="method-M000051" class="method-detail">
672
+ <a name="M000051"></a>
673
+
674
+ <div class="method-heading">
675
+ <a href="#M000051" class="method-signature">
676
+ <span class="method-name">render_object</span><span class="method-args">(obj)</span>
677
+ </a>
678
+ </div>
679
+
680
+ <div class="method-description">
681
+ <p><a class="source-toggle" href="#"
682
+ onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
683
+ <div class="method-source-code" id="M000051-source">
684
+ <pre>
685
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 47</span>
686
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_object</span>(<span class="ruby-identifier">obj</span>)
687
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span> {
688
+ <span class="ruby-ivar">@props</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span> <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">prop</span>) }
689
+ <span class="ruby-identifier">render_action</span>(<span class="ruby-identifier">obj</span>)
690
+ }
691
+ <span class="ruby-keyword kw">end</span>
692
+ </pre>
693
+ </div>
694
+ </div>
695
+ </div>
696
+
697
+ <div id="method-M000053" class="method-detail">
698
+ <a name="M000053"></a>
699
+
700
+ <div class="method-heading">
701
+ <a href="#M000053" class="method-signature">
702
+ <span class="method-name">render_property</span><span class="method-args">(obj, prop)</span>
703
+ </a>
704
+ </div>
705
+
706
+ <div class="method-description">
707
+ <p><a class="source-toggle" href="#"
708
+ onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
709
+ <div class="method-source-code" id="M000053-source">
710
+ <pre>
711
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 62</span>
712
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">prop</span>)
713
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">to_s</span>)
714
+ <span class="ruby-keyword kw">end</span>
715
+ </pre>
716
+ </div>
717
+ </div>
718
+ </div>
719
+
720
+ <div id="method-M000049" class="method-detail">
721
+ <a name="M000049"></a>
722
+
723
+ <div class="method-heading">
724
+ <a href="#M000049" class="method-signature">
725
+ <span class="method-name">render_property_header</span><span class="method-args">(prop)</span>
726
+ </a>
727
+ </div>
728
+
729
+ <div class="method-description">
730
+ <p><a class="source-toggle" href="#"
731
+ onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
732
+ <div class="method-source-code" id="M000049-source">
733
+ <pre>
734
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 37</span>
735
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_property_header</span>(<span class="ruby-identifier">prop</span>)
736
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span> {
737
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">bold</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">capitalize</span>)
738
+ }
739
+ <span class="ruby-keyword kw">end</span>
740
+ </pre>
741
+ </div>
742
+ </div>
743
+ </div>
744
+
745
+ <div id="method-M000040" class="method-detail">
746
+ <a name="M000040"></a>
367
747
 
368
748
  <div class="method-heading">
369
- <a href="#M000035" class="method-signature">
749
+ <a href="#M000040" class="method-signature">
370
750
  <span class="method-name">save</span><span class="method-args">(obj)</span>
371
751
  </a>
372
752
  </div>
373
753
 
374
754
  <div class="method-description">
375
755
  <p><a class="source-toggle" href="#"
376
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
377
- <div class="method-source-code" id="M000035-source">
756
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
757
+ <div class="method-source-code" id="M000040-source">
378
758
  <pre>
379
- <span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line 39</span>
759
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 24</span>
380
760
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">obj</span>)
381
761
  <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">save!</span>
382
762
  <span class="ruby-ivar">@edit</span> = <span class="ruby-keyword kw">nil</span>