wpb 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Changelog.md +9 -3
- data/bin/wpb +3 -5
- data/doc/Bash.html +222 -0
- data/doc/Comment.html +411 -0
- data/doc/Gemfile.html +110 -0
- data/doc/Page.html +315 -0
- data/doc/PagePost.html +422 -0
- data/doc/Post.html +164 -0
- data/doc/Rakefile.html +107 -0
- data/doc/Setting.html +164 -0
- data/doc/User.html +415 -0
- data/doc/WPB.html +188 -0
- data/doc/WPB/AddType.html +254 -0
- data/doc/WPB/App.html +231 -0
- data/doc/bin/wpb.html +54 -0
- data/doc/created.rid +13 -0
- data/doc/index.html +114 -0
- data/doc/lib/wpb/bash_rb.html +56 -0
- data/doc/lib/wpb/comment_rb.html +54 -0
- data/doc/lib/wpb/page_rb.html +203 -0
- data/doc/lib/wpb/pagepost_rb.html +54 -0
- data/doc/lib/wpb/post_rb.html +52 -0
- data/doc/lib/wpb/setting_rb.html +54 -0
- data/doc/lib/wpb/user_rb.html +54 -0
- data/doc/lib/wpb/version_rb.html +52 -0
- data/doc/lib/wpb_rb.html +68 -0
- data/doc/rdoc.css +706 -0
- data/lib/wpb.rb +36 -29
- data/lib/wpb/bash.rb +18 -0
- data/lib/wpb/clamp/attribute.rb +37 -0
- data/lib/wpb/clamp/attribute_declaration.rb +40 -0
- data/lib/wpb/clamp/command.rb +137 -0
- data/lib/wpb/clamp/errors.rb +26 -0
- data/lib/wpb/clamp/help.rb +69 -0
- data/lib/wpb/clamp/option.rb +77 -0
- data/lib/wpb/clamp/option/declaration.rb +58 -0
- data/lib/wpb/clamp/option/parsing.rb +45 -0
- data/lib/wpb/clamp/parameter.rb +70 -0
- data/lib/wpb/clamp/parameter/declaration.rb +28 -0
- data/lib/wpb/clamp/parameter/parsing.rb +28 -0
- data/lib/wpb/clamp/subcommand.rb +23 -0
- data/lib/wpb/clamp/subcommand/declaration.rb +40 -0
- data/lib/wpb/clamp/subcommand/execution.rb +37 -0
- data/lib/wpb/clamp/version.rb +3 -0
- data/lib/wpb/comment.rb +51 -5
- data/lib/wpb/page.rb +46 -0
- data/lib/wpb/pagepost.rb +29 -16
- data/lib/wpb/user.rb +25 -0
- data/lib/wpb/version.rb +4 -1
- metadata +43 -2
data/doc/Gemfile.html
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
+
<head>
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
8
|
+
|
9
|
+
<title>File: Gemfile [RDoc Documentation]</title>
|
10
|
+
|
11
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
|
12
|
+
|
13
|
+
<script src="./js/jquery.js" type="text/javascript"
|
14
|
+
charset="utf-8"></script>
|
15
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
16
|
+
charset="utf-8"></script>
|
17
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
18
|
+
charset="utf-8"></script>
|
19
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
20
|
+
charset="utf-8"></script>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="project-metadata">
|
36
|
+
|
37
|
+
|
38
|
+
<div id="fileindex-section" class="section project-section">
|
39
|
+
<h3 class="section-header">Files</h3>
|
40
|
+
<ul>
|
41
|
+
|
42
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
43
|
+
|
44
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
45
|
+
|
46
|
+
</ul>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
|
50
|
+
<div id="classindex-section" class="section project-section">
|
51
|
+
<h3 class="section-header">Class Index
|
52
|
+
<span class="search-toggle"><img src="./images/find.png"
|
53
|
+
height="16" width="16" alt="[+]"
|
54
|
+
title="show/hide quicksearch" /></span></h3>
|
55
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
56
|
+
<fieldset>
|
57
|
+
<legend>Quicksearch</legend>
|
58
|
+
<input type="text" name="quicksearch" value=""
|
59
|
+
class="quicksearch-field" />
|
60
|
+
</fieldset>
|
61
|
+
</form>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
|
65
|
+
<li><a href="./WPB.html">WPB</a></li>
|
66
|
+
|
67
|
+
<li><a href="./WPB/AddType.html">WPB::AddType</a></li>
|
68
|
+
|
69
|
+
<li><a href="./WPB/App.html">WPB::App</a></li>
|
70
|
+
|
71
|
+
<li><a href="./Bash.html">Bash</a></li>
|
72
|
+
|
73
|
+
<li><a href="./Comment.html">Comment</a></li>
|
74
|
+
|
75
|
+
<li><a href="./Page.html">Page</a></li>
|
76
|
+
|
77
|
+
<li><a href="./PagePost.html">PagePost</a></li>
|
78
|
+
|
79
|
+
<li><a href="./Post.html">Post</a></li>
|
80
|
+
|
81
|
+
<li><a href="./Setting.html">Setting</a></li>
|
82
|
+
|
83
|
+
<li><a href="./User.html">User</a></li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="documentation">
|
94
|
+
<p>
|
95
|
+
source “<a href="http://rubygems.org">rubygems.org</a>“
|
96
|
+
</p>
|
97
|
+
<p>
|
98
|
+
# Specify your gem’s dependencies in wpb.gemspec gemspec
|
99
|
+
</p>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div id="validator-badges">
|
104
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
105
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
106
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
107
|
+
</div>
|
108
|
+
</body>
|
109
|
+
</html>
|
110
|
+
|
data/doc/Page.html
ADDED
@@ -0,0 +1,315 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Page</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="./js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="./lib/wpb/page_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/wpb/page.rb">lib/wpb/page.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="PagePost.html">PagePost</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
|
69
|
+
<!-- Included Modules -->
|
70
|
+
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div id="project-metadata">
|
74
|
+
|
75
|
+
|
76
|
+
<div id="fileindex-section" class="section project-section">
|
77
|
+
<h3 class="section-header">Files</h3>
|
78
|
+
<ul>
|
79
|
+
|
80
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
81
|
+
|
82
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
83
|
+
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<div id="classindex-section" class="section project-section">
|
89
|
+
<h3 class="section-header">Class Index
|
90
|
+
<span class="search-toggle"><img src="./images/find.png"
|
91
|
+
height="16" width="16" alt="[+]"
|
92
|
+
title="show/hide quicksearch" /></span></h3>
|
93
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
94
|
+
<fieldset>
|
95
|
+
<legend>Quicksearch</legend>
|
96
|
+
<input type="text" name="quicksearch" value=""
|
97
|
+
class="quicksearch-field" />
|
98
|
+
</fieldset>
|
99
|
+
</form>
|
100
|
+
|
101
|
+
<ul class="link-list">
|
102
|
+
|
103
|
+
<li><a href="./WPB.html">WPB</a></li>
|
104
|
+
|
105
|
+
<li><a href="./WPB/AddType.html">WPB::AddType</a></li>
|
106
|
+
|
107
|
+
<li><a href="./WPB/App.html">WPB::App</a></li>
|
108
|
+
|
109
|
+
<li><a href="./Bash.html">Bash</a></li>
|
110
|
+
|
111
|
+
<li><a href="./Comment.html">Comment</a></li>
|
112
|
+
|
113
|
+
<li><a href="./Page.html">Page</a></li>
|
114
|
+
|
115
|
+
<li><a href="./PagePost.html">PagePost</a></li>
|
116
|
+
|
117
|
+
<li><a href="./Post.html">Post</a></li>
|
118
|
+
|
119
|
+
<li><a href="./Setting.html">Setting</a></li>
|
120
|
+
|
121
|
+
<li><a href="./User.html">User</a></li>
|
122
|
+
|
123
|
+
</ul>
|
124
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="documentation">
|
132
|
+
<h1 class="class">Page</h1>
|
133
|
+
|
134
|
+
<div id="description">
|
135
|
+
<p>
|
136
|
+
This class is used for getting the pages from the wordpress database
|
137
|
+
</p>
|
138
|
+
<h2>Examples:</h2>
|
139
|
+
<pre>
|
140
|
+
User.find(1).pages
|
141
|
+
</pre>
|
142
|
+
<p>
|
143
|
+
<em>The above will find the user with id of 1 and retrieve all of the pages
|
144
|
+
they have ever made</em>
|
145
|
+
</p>
|
146
|
+
<pre>
|
147
|
+
Page.find(1)
|
148
|
+
</pre>
|
149
|
+
<p>
|
150
|
+
<em>The above will find the pge with id of 1</em>
|
151
|
+
</p>
|
152
|
+
<h2>Inherited methods</h2>
|
153
|
+
<dl>
|
154
|
+
<dt>find <em>id</em></dt><dd><p>
|
155
|
+
Retrieves the page with the sepcified id
|
156
|
+
</p>
|
157
|
+
</dd>
|
158
|
+
<dt>all</dt><dd><p>
|
159
|
+
Retrieves all of the pages in the database
|
160
|
+
</p>
|
161
|
+
</dd>
|
162
|
+
<dt>title</dt><dd><p>
|
163
|
+
The title of the page
|
164
|
+
</p>
|
165
|
+
</dd>
|
166
|
+
<dt>title= <em>title</em></dt><dd><p>
|
167
|
+
Set the title of the page
|
168
|
+
</p>
|
169
|
+
</dd>
|
170
|
+
<dt>content</dt><dd><p>
|
171
|
+
The content of the page
|
172
|
+
</p>
|
173
|
+
</dd>
|
174
|
+
<dt>content=</dt><dd><p>
|
175
|
+
Set the content of the page
|
176
|
+
</p>
|
177
|
+
</dd>
|
178
|
+
</dl>
|
179
|
+
<h2>Database Keys</h2>
|
180
|
+
<dl>
|
181
|
+
<dt>ID <em>alias: id</em></dt><dd><p>
|
182
|
+
The pages` id
|
183
|
+
</p>
|
184
|
+
</dd>
|
185
|
+
<dt>post_author <em>alias: user.id</em></dt><dd><p>
|
186
|
+
The <a href="User.html">User</a> id of who created the <a
|
187
|
+
href="Page.html">Page</a>
|
188
|
+
</p>
|
189
|
+
<pre>
|
190
|
+
Page.find(1).user
|
191
|
+
</pre>
|
192
|
+
<p>
|
193
|
+
<em>The above returns the <a href="User.html">User</a> that the page
|
194
|
+
belongs to</em>
|
195
|
+
</p>
|
196
|
+
</dd>
|
197
|
+
<dt>post_date</dt><dd><p>
|
198
|
+
The date the page was created
|
199
|
+
</p>
|
200
|
+
</dd>
|
201
|
+
<dt>post_date_gmt</dt><dd><p>
|
202
|
+
The date the page was created in gmt/utc time
|
203
|
+
</p>
|
204
|
+
</dd>
|
205
|
+
<dt>post_content <em>alias: <a href="PagePost.html#method-i-content">PagePost#content</a></em></dt><dd><p>
|
206
|
+
The content of the page
|
207
|
+
</p>
|
208
|
+
</dd>
|
209
|
+
<dt>post_title <em>alias: <a href="PagePost.html#method-i-title">PagePost#title</a></em></dt><dd><p>
|
210
|
+
The title of the page
|
211
|
+
</p>
|
212
|
+
</dd>
|
213
|
+
<dt>post_excerpt</dt><dd><p>
|
214
|
+
The excerpt of the page
|
215
|
+
</p>
|
216
|
+
</dd>
|
217
|
+
<dt>post_status</dt><dd><p>
|
218
|
+
The status of the page <em>e.g. <tt>Published</em></tt>
|
219
|
+
</p>
|
220
|
+
</dd>
|
221
|
+
<dt>comment_status</dt><dd><p>
|
222
|
+
Whether or not comments are allowed e.g. open
|
223
|
+
</p>
|
224
|
+
</dd>
|
225
|
+
<dt>ping_status</dt><dd><p>
|
226
|
+
Whether or not pings are allowed e.g. open
|
227
|
+
</p>
|
228
|
+
</dd>
|
229
|
+
<dt>post_password</dt><dd><p>
|
230
|
+
The password (if any) required to view the page
|
231
|
+
</p>
|
232
|
+
</dd>
|
233
|
+
<dt>post_name</dt><dd><p>
|
234
|
+
The url version of the page e.g. example-page
|
235
|
+
</p>
|
236
|
+
</dd>
|
237
|
+
<dt>to_ping</dt><dd><p>
|
238
|
+
<em>Unknown</em>
|
239
|
+
</p>
|
240
|
+
</dd>
|
241
|
+
<dt>pinged</dt><dd><p>
|
242
|
+
<em>Unknown</em>
|
243
|
+
</p>
|
244
|
+
</dd>
|
245
|
+
<dt>post_modified</dt><dd><p>
|
246
|
+
The date the page last edited
|
247
|
+
</p>
|
248
|
+
</dd>
|
249
|
+
<dt>post_modified_gmt</dt><dd><p>
|
250
|
+
The date the page last edited in gmt/utc time
|
251
|
+
</p>
|
252
|
+
</dd>
|
253
|
+
<dt>post_content_filtered</dt><dd><p>
|
254
|
+
<em>Unknown</em>
|
255
|
+
</p>
|
256
|
+
</dd>
|
257
|
+
<dt>post_parent</dt><dd><p>
|
258
|
+
The pages parent id (if any)
|
259
|
+
</p>
|
260
|
+
</dd>
|
261
|
+
<dt>guid</dt><dd><p>
|
262
|
+
The full url to the page
|
263
|
+
</p>
|
264
|
+
</dd>
|
265
|
+
<dt>menu_order</dt><dd><p>
|
266
|
+
The order at which the page sits in the menu
|
267
|
+
</p>
|
268
|
+
</dd>
|
269
|
+
<dt>post_type</dt><dd><p>
|
270
|
+
The type of the post e.g. page or post (will always be page)
|
271
|
+
</p>
|
272
|
+
</dd>
|
273
|
+
<dt>post_mime_type</dt><dd><p>
|
274
|
+
The mime type of the post
|
275
|
+
</p>
|
276
|
+
</dd>
|
277
|
+
<dt>comment_count</dt><dd><p>
|
278
|
+
The amount of comments on the page
|
279
|
+
</p>
|
280
|
+
</dd>
|
281
|
+
<dt>type</dt><dd><p>
|
282
|
+
Used and created by wpb for activerecord inheritance
|
283
|
+
</p>
|
284
|
+
</dd>
|
285
|
+
</dl>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<!-- Constants -->
|
290
|
+
|
291
|
+
|
292
|
+
<!-- Attributes -->
|
293
|
+
|
294
|
+
|
295
|
+
<!-- Methods -->
|
296
|
+
|
297
|
+
|
298
|
+
</div>
|
299
|
+
|
300
|
+
|
301
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
302
|
+
|
303
|
+
<p>Disabled; run with --debug to generate this.</p>
|
304
|
+
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div id="validator-badges">
|
308
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
309
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
310
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
311
|
+
</div>
|
312
|
+
|
313
|
+
</body>
|
314
|
+
</html>
|
315
|
+
|
data/doc/PagePost.html
ADDED
@@ -0,0 +1,422 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: PagePost</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="./js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="./lib/wpb/pagepost_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/wpb/pagepost.rb">lib/wpb/pagepost.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link">ActiveRecord::Base</p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-i-content">#content</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-content%3D">#content=</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-set_default_values">#set_default_values</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-title">#title</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-title%3D">#title=</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-update_date">#update_date</a></li>
|
83
|
+
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<!-- Included Modules -->
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="project-metadata">
|
93
|
+
|
94
|
+
|
95
|
+
<div id="fileindex-section" class="section project-section">
|
96
|
+
<h3 class="section-header">Files</h3>
|
97
|
+
<ul>
|
98
|
+
|
99
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
100
|
+
|
101
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
102
|
+
|
103
|
+
</ul>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<div id="classindex-section" class="section project-section">
|
108
|
+
<h3 class="section-header">Class Index
|
109
|
+
<span class="search-toggle"><img src="./images/find.png"
|
110
|
+
height="16" width="16" alt="[+]"
|
111
|
+
title="show/hide quicksearch" /></span></h3>
|
112
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
113
|
+
<fieldset>
|
114
|
+
<legend>Quicksearch</legend>
|
115
|
+
<input type="text" name="quicksearch" value=""
|
116
|
+
class="quicksearch-field" />
|
117
|
+
</fieldset>
|
118
|
+
</form>
|
119
|
+
|
120
|
+
<ul class="link-list">
|
121
|
+
|
122
|
+
<li><a href="./WPB.html">WPB</a></li>
|
123
|
+
|
124
|
+
<li><a href="./WPB/AddType.html">WPB::AddType</a></li>
|
125
|
+
|
126
|
+
<li><a href="./WPB/App.html">WPB::App</a></li>
|
127
|
+
|
128
|
+
<li><a href="./Bash.html">Bash</a></li>
|
129
|
+
|
130
|
+
<li><a href="./Comment.html">Comment</a></li>
|
131
|
+
|
132
|
+
<li><a href="./Page.html">Page</a></li>
|
133
|
+
|
134
|
+
<li><a href="./PagePost.html">PagePost</a></li>
|
135
|
+
|
136
|
+
<li><a href="./Post.html">Post</a></li>
|
137
|
+
|
138
|
+
<li><a href="./Setting.html">Setting</a></li>
|
139
|
+
|
140
|
+
<li><a href="./User.html">User</a></li>
|
141
|
+
|
142
|
+
</ul>
|
143
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div id="documentation">
|
151
|
+
<h1 class="class">PagePost</h1>
|
152
|
+
|
153
|
+
<div id="description">
|
154
|
+
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<!-- Constants -->
|
158
|
+
|
159
|
+
|
160
|
+
<!-- Attributes -->
|
161
|
+
|
162
|
+
|
163
|
+
<!-- Methods -->
|
164
|
+
|
165
|
+
<div id="public-instance-method-details" class="method-section section">
|
166
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
167
|
+
|
168
|
+
|
169
|
+
<div id="content-method" class="method-detail ">
|
170
|
+
<a name="method-i-content"></a>
|
171
|
+
|
172
|
+
<div class="method-heading">
|
173
|
+
|
174
|
+
<span class="method-name">content</span><span
|
175
|
+
class="method-args">()</span>
|
176
|
+
<span class="method-click-advice">click to toggle source</span>
|
177
|
+
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
|
182
|
+
<p>
|
183
|
+
Grab the content of the selected page/post
|
184
|
+
</p>
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<div class="method-source-code"
|
189
|
+
id="content-source">
|
190
|
+
<pre>
|
191
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 31</span>
|
192
|
+
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content</span>
|
193
|
+
32: <span class="ruby-identifier">post_content</span>
|
194
|
+
33: <span class="ruby-keyword kw">end</span></pre>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
<div id="content--method" class="method-detail ">
|
206
|
+
<a name="method-i-content%3D"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
|
210
|
+
<span class="method-name">content=</span><span
|
211
|
+
class="method-args">(new_content)</span>
|
212
|
+
<span class="method-click-advice">click to toggle source</span>
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<div class="method-description">
|
217
|
+
|
218
|
+
<p>
|
219
|
+
Set the content of the selected page/post
|
220
|
+
</p>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<div class="method-source-code"
|
225
|
+
id="content--source">
|
226
|
+
<pre>
|
227
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 38</span>
|
228
|
+
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content=</span> <span class="ruby-identifier">new_content</span>
|
229
|
+
39: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_content</span> = <span class="ruby-identifier">new_content</span>
|
230
|
+
40: <span class="ruby-keyword kw">end</span></pre>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</div>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</div>
|
239
|
+
|
240
|
+
|
241
|
+
<div id="title-method" class="method-detail ">
|
242
|
+
<a name="method-i-title"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
|
246
|
+
<span class="method-name">title</span><span
|
247
|
+
class="method-args">()</span>
|
248
|
+
<span class="method-click-advice">click to toggle source</span>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div class="method-description">
|
253
|
+
|
254
|
+
<p>
|
255
|
+
Grab the title of the selected page/post
|
256
|
+
</p>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
<div class="method-source-code"
|
261
|
+
id="title-source">
|
262
|
+
<pre>
|
263
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 17</span>
|
264
|
+
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">title</span>
|
265
|
+
18: <span class="ruby-identifier">post_title</span>
|
266
|
+
19: <span class="ruby-keyword kw">end</span></pre>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</div>
|
275
|
+
|
276
|
+
|
277
|
+
<div id="title--method" class="method-detail ">
|
278
|
+
<a name="method-i-title%3D"></a>
|
279
|
+
|
280
|
+
<div class="method-heading">
|
281
|
+
|
282
|
+
<span class="method-name">title=</span><span
|
283
|
+
class="method-args">(new_title)</span>
|
284
|
+
<span class="method-click-advice">click to toggle source</span>
|
285
|
+
|
286
|
+
</div>
|
287
|
+
|
288
|
+
<div class="method-description">
|
289
|
+
|
290
|
+
<p>
|
291
|
+
Set the title of the selected page/post
|
292
|
+
</p>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<div class="method-source-code"
|
297
|
+
id="title--source">
|
298
|
+
<pre>
|
299
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 24</span>
|
300
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">title=</span> <span class="ruby-identifier">new_title</span>
|
301
|
+
25: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_title</span> = <span class="ruby-identifier">new_title</span>
|
302
|
+
26: <span class="ruby-keyword kw">end</span></pre>
|
303
|
+
</div>
|
304
|
+
|
305
|
+
</div>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
313
|
+
</div>
|
314
|
+
|
315
|
+
<div id="private-instance-method-details" class="method-section section">
|
316
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
317
|
+
|
318
|
+
|
319
|
+
<div id="set-default-values-method" class="method-detail ">
|
320
|
+
<a name="method-i-set_default_values"></a>
|
321
|
+
|
322
|
+
<div class="method-heading">
|
323
|
+
|
324
|
+
<span class="method-name">set_default_values</span><span
|
325
|
+
class="method-args">()</span>
|
326
|
+
<span class="method-click-advice">click to toggle source</span>
|
327
|
+
|
328
|
+
</div>
|
329
|
+
|
330
|
+
<div class="method-description">
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
<div class="method-source-code"
|
337
|
+
id="set-default-values-source">
|
338
|
+
<pre>
|
339
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 43</span>
|
340
|
+
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_default_values</span>
|
341
|
+
44: <span class="ruby-identifier">t</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
342
|
+
45: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_date</span> = <span class="ruby-identifier">t</span>
|
343
|
+
46: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_date_gmt</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">gmtime</span>
|
344
|
+
47:
|
345
|
+
48: <span class="ruby-comment cmt"># Ready for when Site model is added</span>
|
346
|
+
49: <span class="ruby-comment cmt"># site_url = Site.find_by_option_name "siteurl"</span>
|
347
|
+
50: <span class="ruby-comment cmt"># type = 'p'</span>
|
348
|
+
51: <span class="ruby-comment cmt"># if self.type == "Page"</span>
|
349
|
+
52: <span class="ruby-comment cmt"># type << 'age_id'</span>
|
350
|
+
53: <span class="ruby-comment cmt"># end</span>
|
351
|
+
54: <span class="ruby-comment cmt"># self.guid = "#{site_url}/?#{type}=#{self.id}"</span>
|
352
|
+
55:
|
353
|
+
56: <span class="ruby-identifier">urlify</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_title</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">' '</span>, <span class="ruby-value str">'-'</span>)
|
354
|
+
57: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_name</span> = <span class="ruby-identifier">urlify</span>
|
355
|
+
58: <span class="ruby-keyword kw">end</span></pre>
|
356
|
+
</div>
|
357
|
+
|
358
|
+
</div>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
</div>
|
364
|
+
|
365
|
+
|
366
|
+
<div id="update-date-method" class="method-detail ">
|
367
|
+
<a name="method-i-update_date"></a>
|
368
|
+
|
369
|
+
<div class="method-heading">
|
370
|
+
|
371
|
+
<span class="method-name">update_date</span><span
|
372
|
+
class="method-args">()</span>
|
373
|
+
<span class="method-click-advice">click to toggle source</span>
|
374
|
+
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div class="method-description">
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
<div class="method-source-code"
|
384
|
+
id="update-date-source">
|
385
|
+
<pre>
|
386
|
+
<span class="ruby-comment cmt"># File lib/wpb/pagepost.rb, line 60</span>
|
387
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_date</span>
|
388
|
+
61: <span class="ruby-identifier">t</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
389
|
+
62: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_modified</span> = <span class="ruby-identifier">t</span>
|
390
|
+
63: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post_modified_gmt</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">gmtime</span>
|
391
|
+
64: <span class="ruby-keyword kw">end</span></pre>
|
392
|
+
</div>
|
393
|
+
|
394
|
+
</div>
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
</div>
|
400
|
+
|
401
|
+
|
402
|
+
</div>
|
403
|
+
|
404
|
+
|
405
|
+
</div>
|
406
|
+
|
407
|
+
|
408
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
409
|
+
|
410
|
+
<p>Disabled; run with --debug to generate this.</p>
|
411
|
+
|
412
|
+
</div>
|
413
|
+
|
414
|
+
<div id="validator-badges">
|
415
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
416
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
417
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
418
|
+
</div>
|
419
|
+
|
420
|
+
</body>
|
421
|
+
</html>
|
422
|
+
|