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
@@ -0,0 +1,490 @@
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: OgScaffolder::Editor</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">OgScaffolder::Editor</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/wee/databases/og/scaffolder_rb.html">
59
+ lib/wee/databases/og/scaffolder.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="../Wee/Component.html">
69
+ Wee::Component
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="#M000072">cancel</a>&nbsp;&nbsp;
92
+ <a href="#M000068">each_property</a>&nbsp;&nbsp;
93
+ <a href="#M000069">get_value_of</a>&nbsp;&nbsp;
94
+ <a href="#M000059">new</a>&nbsp;&nbsp;
95
+ <a href="#M000060">render</a>&nbsp;&nbsp;
96
+ <a href="#M000065">render_bool</a>&nbsp;&nbsp;
97
+ <a href="#M000066">render_buttons</a>&nbsp;&nbsp;
98
+ <a href="#M000061">render_header</a>&nbsp;&nbsp;
99
+ <a href="#M000067">render_label</a>&nbsp;&nbsp;
100
+ <a href="#M000063">render_numeric</a>&nbsp;&nbsp;
101
+ <a href="#M000062">render_property</a>&nbsp;&nbsp;
102
+ <a href="#M000064">render_string</a>&nbsp;&nbsp;
103
+ <a href="#M000071">save</a>&nbsp;&nbsp;
104
+ <a href="#M000070">set_value_of</a>&nbsp;&nbsp;
105
+ </div>
106
+ </div>
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+
113
+ <div id="section">
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <!-- if method_list -->
123
+ <div id="methods">
124
+ <h3 class="section-bar">Public Class methods</h3>
125
+
126
+ <div id="method-M000059" class="method-detail">
127
+ <a name="M000059"></a>
128
+
129
+ <div class="method-heading">
130
+ <a href="#M000059" class="method-signature">
131
+ <span class="method-name">new</span><span class="method-args">(domain_object, action=&quot;Edit&quot;)</span>
132
+ </a>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+ <p><a class="source-toggle" href="#"
137
+ onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
138
+ <div class="method-source-code" id="M000059-source">
139
+ <pre>
140
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 91</span>
141
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain_object</span>, <span class="ruby-identifier">action</span>=<span class="ruby-value str">&quot;Edit&quot;</span>)
142
+ <span class="ruby-keyword kw">super</span>()
143
+ <span class="ruby-ivar">@domain_object</span> = <span class="ruby-identifier">domain_object</span>
144
+ <span class="ruby-ivar">@action</span> = <span class="ruby-identifier">action</span>
145
+ <span class="ruby-keyword kw">end</span>
146
+ </pre>
147
+ </div>
148
+ </div>
149
+ </div>
150
+
151
+ <h3 class="section-bar">Public Instance methods</h3>
152
+
153
+ <div id="method-M000060" class="method-detail">
154
+ <a name="M000060"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="#M000060" class="method-signature">
158
+ <span class="method-name">render</span><span class="method-args">()</span>
159
+ </a>
160
+ </div>
161
+
162
+ <div class="method-description">
163
+ <p><a class="source-toggle" href="#"
164
+ onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000060-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 97</span>
168
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
169
+ <span class="ruby-identifier">render_header</span>
170
+ <span class="ruby-identifier">each_property</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
171
+ <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">prop</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'oid'</span>
172
+ }
173
+ <span class="ruby-identifier">render_buttons</span>
174
+ <span class="ruby-keyword kw">end</span>
175
+ </pre>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <div id="method-M000065" class="method-detail">
181
+ <a name="M000065"></a>
182
+
183
+ <div class="method-heading">
184
+ <a href="#M000065" class="method-signature">
185
+ <span class="method-name">render_bool</span><span class="method-args">(prop)</span>
186
+ </a>
187
+ </div>
188
+
189
+ <div class="method-description">
190
+ <p><a class="source-toggle" href="#"
191
+ onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
192
+ <div class="method-source-code" id="M000065-source">
193
+ <pre>
194
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 133</span>
195
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_bool</span>(<span class="ruby-identifier">prop</span>)
196
+ <span class="ruby-identifier">selected</span> = [ <span class="ruby-identifier">get_value_of</span>(<span class="ruby-identifier">prop</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span> ]
197
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">select_list</span>([<span class="ruby-keyword kw">true</span>, <span class="ruby-keyword kw">false</span>]).<span class="ruby-identifier">labels</span>([<span class="ruby-value str">&quot;Yes&quot;</span>, <span class="ruby-value str">&quot;No&quot;</span>]).<span class="ruby-identifier">selected</span>(<span class="ruby-identifier">selected</span>).
198
+ <span class="ruby-identifier">callback</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">choosen</span><span class="ruby-operator">|</span> <span class="ruby-identifier">set_value_of</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">choosen</span>.<span class="ruby-identifier">first</span>) }
199
+ <span class="ruby-keyword kw">end</span>
200
+ </pre>
201
+ </div>
202
+ </div>
203
+ </div>
204
+
205
+ <div id="method-M000066" class="method-detail">
206
+ <a name="M000066"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="#M000066" class="method-signature">
210
+ <span class="method-name">render_buttons</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('M000066-source');return false;">[Source]</a></p>
217
+ <div class="method-source-code" id="M000066-source">
218
+ <pre>
219
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 139</span>
220
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_buttons</span>
221
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
222
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'Save'</span>).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:save</span>)
223
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
224
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'Cancel'</span>).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:cancel</span>)
225
+ <span class="ruby-keyword kw">end</span>
226
+ </pre>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+ <div id="method-M000061" class="method-detail">
232
+ <a name="M000061"></a>
233
+
234
+ <div class="method-heading">
235
+ <a href="#M000061" class="method-signature">
236
+ <span class="method-name">render_header</span><span class="method-args">()</span>
237
+ </a>
238
+ </div>
239
+
240
+ <div class="method-description">
241
+ <p><a class="source-toggle" href="#"
242
+ onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
243
+ <div class="method-source-code" id="M000061-source">
244
+ <pre>
245
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 105</span>
246
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_header</span>
247
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">h1</span> <span class="ruby-node">&quot;#{ @action } #{ @domain_object.class }&quot;</span>
248
+ <span class="ruby-keyword kw">end</span>
249
+ </pre>
250
+ </div>
251
+ </div>
252
+ </div>
253
+
254
+ <div id="method-M000067" class="method-detail">
255
+ <a name="M000067"></a>
256
+
257
+ <div class="method-heading">
258
+ <a href="#M000067" class="method-signature">
259
+ <span class="method-name">render_label</span><span class="method-args">(prop)</span>
260
+ </a>
261
+ </div>
262
+
263
+ <div class="method-description">
264
+ <p><a class="source-toggle" href="#"
265
+ onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
266
+ <div class="method-source-code" id="M000067-source">
267
+ <pre>
268
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 146</span>
269
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_label</span>(<span class="ruby-identifier">prop</span>)
270
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
271
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">capitalize</span>
272
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">break</span>
273
+ <span class="ruby-keyword kw">end</span>
274
+ </pre>
275
+ </div>
276
+ </div>
277
+ </div>
278
+
279
+ <div id="method-M000063" class="method-detail">
280
+ <a name="M000063"></a>
281
+
282
+ <div class="method-heading">
283
+ <a href="#M000063" class="method-signature">
284
+ <span class="method-name">render_numeric</span><span class="method-args">(prop)</span>
285
+ </a>
286
+ </div>
287
+
288
+ <div class="method-description">
289
+ <p><a class="source-toggle" href="#"
290
+ onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
291
+ <div class="method-source-code" id="M000063-source">
292
+ <pre>
293
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 121</span>
294
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_numeric</span>(<span class="ruby-identifier">prop</span>)
295
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_input</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">get_value_of</span>(<span class="ruby-identifier">prop</span>)).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:set_value_of</span>, <span class="ruby-identifier">prop</span>)
296
+ <span class="ruby-keyword kw">end</span>
297
+ </pre>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+ <div id="method-M000062" class="method-detail">
303
+ <a name="M000062"></a>
304
+
305
+ <div class="method-heading">
306
+ <a href="#M000062" class="method-signature">
307
+ <span class="method-name">render_property</span><span class="method-args">(prop)</span>
308
+ </a>
309
+ </div>
310
+
311
+ <div class="method-description">
312
+ <p><a class="source-toggle" href="#"
313
+ onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
314
+ <div class="method-source-code" id="M000062-source">
315
+ <pre>
316
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 109</span>
317
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">prop</span>)
318
+ <span class="ruby-identifier">render_label</span>(<span class="ruby-identifier">prop</span>)
319
+
320
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">Numeric</span>)
321
+ <span class="ruby-identifier">render_numeric</span>(<span class="ruby-identifier">prop</span>)
322
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">String</span>)
323
+ <span class="ruby-identifier">render_string</span>(<span class="ruby-identifier">prop</span>)
324
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">TrueClass</span>)
325
+ <span class="ruby-identifier">render_bool</span>(<span class="ruby-identifier">prop</span>)
326
+ <span class="ruby-keyword kw">end</span>
327
+ <span class="ruby-keyword kw">end</span>
328
+ </pre>
329
+ </div>
330
+ </div>
331
+ </div>
332
+
333
+ <div id="method-M000064" class="method-detail">
334
+ <a name="M000064"></a>
335
+
336
+ <div class="method-heading">
337
+ <a href="#M000064" class="method-signature">
338
+ <span class="method-name">render_string</span><span class="method-args">(prop)</span>
339
+ </a>
340
+ </div>
341
+
342
+ <div class="method-description">
343
+ <p><a class="source-toggle" href="#"
344
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
345
+ <div class="method-source-code" id="M000064-source">
346
+ <pre>
347
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 125</span>
348
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_string</span>(<span class="ruby-identifier">prop</span>)
349
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">meta</span>[<span class="ruby-identifier">:ui</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">:textarea</span>
350
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_area</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:set_value_of</span>, <span class="ruby-identifier">prop</span>).<span class="ruby-identifier">with</span>(<span class="ruby-identifier">get_value_of</span>(<span class="ruby-identifier">prop</span>))
351
+ <span class="ruby-keyword kw">else</span>
352
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_input</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">get_value_of</span>(<span class="ruby-identifier">prop</span>)).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:set_value_of</span>, <span class="ruby-identifier">prop</span>)
353
+ <span class="ruby-keyword kw">end</span>
354
+ <span class="ruby-keyword kw">end</span>
355
+ </pre>
356
+ </div>
357
+ </div>
358
+ </div>
359
+
360
+ <h3 class="section-bar">Private Instance methods</h3>
361
+
362
+ <div id="method-M000072" class="method-detail">
363
+ <a name="M000072"></a>
364
+
365
+ <div class="method-heading">
366
+ <a href="#M000072" class="method-signature">
367
+ <span class="method-name">cancel</span><span class="method-args">()</span>
368
+ </a>
369
+ </div>
370
+
371
+ <div class="method-description">
372
+ <p><a class="source-toggle" href="#"
373
+ onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
374
+ <div class="method-source-code" id="M000072-source">
375
+ <pre>
376
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 171</span>
377
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancel</span>
378
+ <span class="ruby-identifier">answer</span> <span class="ruby-keyword kw">nil</span>
379
+ <span class="ruby-keyword kw">end</span>
380
+ </pre>
381
+ </div>
382
+ </div>
383
+ </div>
384
+
385
+ <div id="method-M000068" class="method-detail">
386
+ <a name="M000068"></a>
387
+
388
+ <div class="method-heading">
389
+ <a href="#M000068" class="method-signature">
390
+ <span class="method-name">each_property</span><span class="method-args">(&amp;block)</span>
391
+ </a>
392
+ </div>
393
+
394
+ <div class="method-description">
395
+ <p><a class="source-toggle" href="#"
396
+ onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
397
+ <div class="method-source-code" id="M000068-source">
398
+ <pre>
399
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 154</span>
400
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_property</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
401
+ <span class="ruby-ivar">@domain_object</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">__props</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
402
+ <span class="ruby-keyword kw">end</span>
403
+ </pre>
404
+ </div>
405
+ </div>
406
+ </div>
407
+
408
+ <div id="method-M000069" class="method-detail">
409
+ <a name="M000069"></a>
410
+
411
+ <div class="method-heading">
412
+ <a href="#M000069" class="method-signature">
413
+ <span class="method-name">get_value_of</span><span class="method-args">(prop)</span>
414
+ </a>
415
+ </div>
416
+
417
+ <div class="method-description">
418
+ <p><a class="source-toggle" href="#"
419
+ onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
420
+ <div class="method-source-code" id="M000069-source">
421
+ <pre>
422
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 158</span>
423
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_of</span>(<span class="ruby-identifier">prop</span>)
424
+ <span class="ruby-ivar">@domain_object</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">symbol</span>)
425
+ <span class="ruby-keyword kw">end</span>
426
+ </pre>
427
+ </div>
428
+ </div>
429
+ </div>
430
+
431
+ <div id="method-M000071" class="method-detail">
432
+ <a name="M000071"></a>
433
+
434
+ <div class="method-heading">
435
+ <a href="#M000071" class="method-signature">
436
+ <span class="method-name">save</span><span class="method-args">()</span>
437
+ </a>
438
+ </div>
439
+
440
+ <div class="method-description">
441
+ <p><a class="source-toggle" href="#"
442
+ onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
443
+ <div class="method-source-code" id="M000071-source">
444
+ <pre>
445
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 166</span>
446
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>
447
+ <span class="ruby-ivar">@domain_object</span>.<span class="ruby-identifier">save!</span>
448
+ <span class="ruby-identifier">answer</span> <span class="ruby-ivar">@domain_object</span>
449
+ <span class="ruby-keyword kw">end</span>
450
+ </pre>
451
+ </div>
452
+ </div>
453
+ </div>
454
+
455
+ <div id="method-M000070" class="method-detail">
456
+ <a name="M000070"></a>
457
+
458
+ <div class="method-heading">
459
+ <a href="#M000070" class="method-signature">
460
+ <span class="method-name">set_value_of</span><span class="method-args">(prop, value)</span>
461
+ </a>
462
+ </div>
463
+
464
+ <div class="method-description">
465
+ <p><a class="source-toggle" href="#"
466
+ onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
467
+ <div class="method-source-code" id="M000070-source">
468
+ <pre>
469
+ <span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 162</span>
470
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_value_of</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">value</span>)
471
+ <span class="ruby-ivar">@domain_object</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;=&quot;</span>, <span class="ruby-identifier">value</span>)
472
+ <span class="ruby-keyword kw">end</span>
473
+ </pre>
474
+ </div>
475
+ </div>
476
+ </div>
477
+
478
+
479
+ </div>
480
+
481
+
482
+ </div>
483
+
484
+
485
+ <div id="validator-badges">
486
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
487
+ </div>
488
+
489
+ </body>
490
+ </html>