hobix 0.4 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/COPYING +18 -0
  2. data/README +18 -0
  3. data/Rakefile +96 -0
  4. data/bin/hobix +7 -3
  5. data/contrib/blosxom-to-hobix.rb +253 -0
  6. data/contrib/txp-to-hobix.rb +56 -0
  7. data/contrib/webrick-all-mine.rb +20 -0
  8. data/doc/CHANGELOG +285 -0
  9. data/doc/rdoc/classes/Hobix/API.html +382 -0
  10. data/doc/rdoc/classes/Hobix/Article.html +111 -0
  11. data/doc/rdoc/classes/Hobix/BaseContent.html +692 -0
  12. data/doc/rdoc/classes/Hobix/BaseEntry.html +218 -0
  13. data/doc/rdoc/classes/Hobix/BaseFacet.html +205 -0
  14. data/doc/rdoc/classes/Hobix/BaseOutput.html +122 -0
  15. data/doc/rdoc/classes/Hobix/BasePlugin.html +201 -0
  16. data/doc/rdoc/classes/Hobix/BaseProperties/ClassMethods.html +243 -0
  17. data/doc/rdoc/classes/Hobix/BaseProperties.html +218 -0
  18. data/doc/rdoc/classes/Hobix/BasePublish.html +157 -0
  19. data/doc/rdoc/classes/Hobix/BaseStorage.html +417 -0
  20. data/doc/rdoc/classes/Hobix/BixWik/Entry.html +196 -0
  21. data/doc/rdoc/classes/Hobix/BixWik/IndexEntry.html +170 -0
  22. data/doc/rdoc/classes/Hobix/BixWik/WikiRedCloth.html +111 -0
  23. data/doc/rdoc/classes/Hobix/BixWik.html +418 -0
  24. data/doc/rdoc/classes/Hobix/BixWikPlugin.html +158 -0
  25. data/doc/rdoc/classes/Hobix/CommandLine.html +1970 -0
  26. data/doc/rdoc/classes/Hobix/Comment.html +113 -0
  27. data/doc/rdoc/classes/Hobix/Config.html +212 -0
  28. data/doc/rdoc/classes/Hobix/DataMarsh.html +667 -0
  29. data/doc/rdoc/classes/Hobix/Entry.html +178 -0
  30. data/doc/rdoc/classes/Hobix/EntryEnum.html +162 -0
  31. data/doc/rdoc/classes/Hobix/Enumerable.html +170 -0
  32. data/doc/rdoc/classes/Hobix/Facets/WikiEdit.html +180 -0
  33. data/doc/rdoc/classes/Hobix/Facets.html +111 -0
  34. data/doc/rdoc/classes/Hobix/LinkList.html +182 -0
  35. data/doc/rdoc/classes/Hobix/Out/Quick.html +412 -0
  36. data/doc/rdoc/classes/Hobix/Out.html +119 -0
  37. data/doc/rdoc/classes/Hobix/Page.html +381 -0
  38. data/doc/rdoc/classes/Hobix/Trackback.html +113 -0
  39. data/doc/rdoc/classes/Hobix/UriStr.html +198 -0
  40. data/doc/rdoc/classes/Hobix/WebApp/QueryString.html +207 -0
  41. data/doc/rdoc/classes/Hobix/WebApp/QueryValidationFailure.html +111 -0
  42. data/doc/rdoc/classes/Hobix/WebApp.html +1383 -0
  43. data/doc/rdoc/classes/Hobix/Weblog/AuthorNotFound.html +111 -0
  44. data/doc/rdoc/classes/Hobix/Weblog.html +2082 -0
  45. data/doc/rdoc/classes/Hobix.html +399 -0
  46. data/doc/rdoc/classes/Kernel.html +139 -0
  47. data/doc/rdoc/classes/Regexp.html +154 -0
  48. data/doc/rdoc/classes/YAML/Omap.html +144 -0
  49. data/doc/rdoc/classes/YAML.html +111 -0
  50. data/doc/rdoc/created.rid +1 -0
  51. data/doc/rdoc/files/COPYING.html +129 -0
  52. data/doc/rdoc/files/README.html +131 -0
  53. data/doc/rdoc/files/doc/CHANGELOG.html +101 -0
  54. data/doc/rdoc/files/lib/hobix/api_rb.html +119 -0
  55. data/doc/rdoc/files/lib/hobix/article_rb.html +126 -0
  56. data/doc/rdoc/files/lib/hobix/base_rb.html +128 -0
  57. data/doc/rdoc/files/lib/hobix/bixwik_rb.html +126 -0
  58. data/doc/rdoc/files/lib/hobix/commandline_rb.html +140 -0
  59. data/doc/rdoc/files/lib/hobix/comments_rb.html +126 -0
  60. data/doc/rdoc/files/lib/hobix/config_rb.html +125 -0
  61. data/doc/rdoc/files/lib/hobix/datamarsh_rb.html +108 -0
  62. data/doc/rdoc/files/lib/hobix/entry_rb.html +118 -0
  63. data/doc/rdoc/files/lib/hobix/linklist_rb.html +127 -0
  64. data/doc/rdoc/files/lib/hobix/publisher_rb.html +126 -0
  65. data/doc/rdoc/files/lib/hobix/trackbacks_rb.html +128 -0
  66. data/doc/rdoc/files/lib/hobix/webapp_rb.html +127 -0
  67. data/doc/rdoc/files/lib/hobix/weblog_rb.html +135 -0
  68. data/doc/rdoc/files/lib/hobix_rb.html +127 -0
  69. data/doc/rdoc/fr_class_index.html +67 -0
  70. data/doc/rdoc/fr_file_index.html +44 -0
  71. data/doc/rdoc/fr_method_index.html +307 -0
  72. data/doc/rdoc/index.html +24 -0
  73. data/doc/rdoc/rdoc-style.css +208 -0
  74. data/git_hobix_update.php +13 -0
  75. data/lib/hobix/base.rb +6 -3
  76. data/lib/hobix/bixwik.rb +12 -12
  77. data/lib/hobix/commandline.rb +18 -2
  78. data/lib/hobix/comments.rb +4 -5
  79. data/lib/hobix/entry.rb +2 -1
  80. data/lib/hobix/facets/comments.rb +31 -6
  81. data/lib/hobix/linklist.rb +6 -1
  82. data/lib/hobix/out/atom.rb +29 -20
  83. data/lib/hobix/out/quick.rb +8 -6
  84. data/lib/hobix/out/rss.rb +16 -3
  85. data/lib/hobix/plugin/akismet.rb +196 -0
  86. data/lib/hobix/plugin/calendar.rb +6 -14
  87. data/lib/hobix/plugin/recent_comments.rb +4 -2
  88. data/lib/hobix/plugin/tags.rb +1 -1
  89. data/lib/hobix/storage/filesys.rb +41 -31
  90. data/lib/hobix/trackbacks.rb +1 -2
  91. data/lib/hobix/weblog.rb +73 -40
  92. data/lib/hobix.rb +9 -2
  93. data/share/default-blog/hobix.yaml +16 -0
  94. data/share/default-blog/htdocs/site.css +174 -0
  95. data/share/default-blog/skel/entry.html.quick +0 -0
  96. data/share/default-blog/skel/index.atom.atom +0 -0
  97. data/share/default-blog/skel/index.html.quick-summary +0 -0
  98. data/share/default-blog/skel/index.xml.rss +0 -0
  99. data/share/default-blog/skel/index.yaml.okaynews +0 -0
  100. data/share/default-blog/skel/monthly.html.quick-archive +0 -0
  101. data/share/default-blog/skel/section.html.quick-archive +0 -0
  102. data/share/default-blog/skel/yearly.html.quick-archive +0 -0
  103. data/share/default-blog-modes.yaml +7 -0
  104. data/share/default-blog.apache-cgi.patch +8 -0
  105. data/share/default-blog.apache-ssi.patch +38 -0
  106. data/share/default-blog.apache2-ssi.patch +3 -0
  107. data/share/default-blog.cgi.patch +8 -0
  108. data/share/default-blog.comments.patch +5 -0
  109. data/share/default-blog.prototype.patch +766 -0
  110. data/share/default-blog.publisher.patch +5 -0
  111. data/share/default-blog.wiki.patch +29 -0
  112. data/share/publisher/css/control.css +90 -0
  113. data/share/publisher/css/form.css +238 -0
  114. data/share/publisher/css/form.import.css +72 -0
  115. data/share/publisher/css/main-menu.css +134 -0
  116. data/share/publisher/i/hobix-emblazen-1.png +0 -0
  117. data/share/publisher/i/hobix-emblazen-2.png +0 -0
  118. data/share/publisher/i/hobix-emblazen-3.png +0 -0
  119. data/share/publisher/i/hobix-emblazen-4.png +0 -0
  120. data/share/publisher/i/hobix-emblazen-5.png +0 -0
  121. data/share/publisher/i/hobix-emblazen-6.png +0 -0
  122. data/share/publisher/i/hobix-emblazen-7.png +0 -0
  123. data/share/publisher/index.erb +66 -0
  124. data/share/publisher/js/controls.js +261 -0
  125. data/share/publisher/js/dragdrop.js +476 -0
  126. data/share/publisher/js/effects.js +570 -0
  127. data/share/publisher/js/prototype.js +1011 -0
  128. metadata +196 -53
  129. checksums.yaml +0 -7
@@ -0,0 +1,201 @@
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: Hobix::BasePlugin</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">Hobix::BasePlugin</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/hobix/base_rb.html">
59
+ lib/hobix/base.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
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ The <a href="BasePlugin.html">BasePlugin</a> class is <b>bingo</b> the
84
+ underlying class for all <a href="../Hobix.html">Hobix</a> plugins. The
85
+ +Class::inherited+ hook is used by this class to keep track of all classes
86
+ that inherit from it.
87
+ </p>
88
+
89
+ </div>
90
+
91
+
92
+ </div>
93
+
94
+ <div id="method-list">
95
+ <h3 class="section-bar">Methods</h3>
96
+
97
+ <div class="name-list">
98
+ <a href="#M000106">inherited</a>&nbsp;&nbsp;
99
+ <a href="#M000105">start</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-M000106" class="method-detail">
122
+ <a name="M000106"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="#M000106" class="method-signature">
126
+ <span class="method-name">inherited</span><span class="method-args">( sub )</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000106-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 56</span>
136
+ 56: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">BasePlugin</span>.<span class="ruby-identifier">inherited</span>( <span class="ruby-identifier">sub</span> )
137
+ 57: <span class="ruby-ivar">@@plugins</span>[<span class="ruby-ivar">@@required_from</span>] <span class="ruby-operator">||=</span> []
138
+ 58: <span class="ruby-ivar">@@plugins</span>[<span class="ruby-ivar">@@required_from</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sub</span>
139
+ 59: <span class="ruby-keyword kw">end</span>
140
+ </pre>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div id="method-M000105" class="method-detail">
146
+ <a name="M000105"></a>
147
+
148
+ <div class="method-heading">
149
+ <a href="#M000105" class="method-signature">
150
+ <span class="method-name">start</span><span class="method-args">( req, opts, weblog )</span>
151
+ </a>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+ <p>
156
+ Initializes all the plugins, returning an Array of plugin objects. (Used by
157
+ the +<a href="Weblog.html">Hobix::Weblog</a>+ class.)
158
+ </p>
159
+ <p><a class="source-toggle" href="#"
160
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
161
+ <div class="method-source-code" id="M000105-source">
162
+ <pre>
163
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 36</span>
164
+ 36: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">BasePlugin</span>.<span class="ruby-identifier">start</span>( <span class="ruby-identifier">req</span>, <span class="ruby-identifier">opts</span>, <span class="ruby-identifier">weblog</span> )
165
+ 37: <span class="ruby-ivar">@@required_from</span> = <span class="ruby-identifier">req</span> = <span class="ruby-identifier">req</span>.<span class="ruby-identifier">dup</span>
166
+ 38: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">req</span>.<span class="ruby-identifier">tainted?</span>
167
+ 39: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">untaint</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">req</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[\w\/\\]+$/</span>
168
+ 40: <span class="ruby-keyword kw">end</span>
169
+ 41: <span class="ruby-identifier">require</span>( <span class="ruby-identifier">req</span> )
170
+ 42: <span class="ruby-ivar">@@required_from</span> = <span class="ruby-keyword kw">nil</span>
171
+ 43:
172
+ 44: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@plugins</span>[<span class="ruby-identifier">req</span>]
173
+ 45: <span class="ruby-ivar">@@plugins</span>[<span class="ruby-identifier">req</span>].<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
174
+ 46: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>
175
+ 47: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">weblog</span>, <span class="ruby-identifier">opts</span> )
176
+ 48: <span class="ruby-keyword kw">else</span>
177
+ 49: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">weblog</span> )
178
+ 50: <span class="ruby-keyword kw">end</span>
179
+ 51: <span class="ruby-keyword kw">end</span>
180
+ 52: <span class="ruby-keyword kw">else</span>
181
+ 53: []
182
+ 54: <span class="ruby-keyword kw">end</span>
183
+ 55: <span class="ruby-keyword kw">end</span>
184
+ </pre>
185
+ </div>
186
+ </div>
187
+ </div>
188
+
189
+
190
+ </div>
191
+
192
+
193
+ </div>
194
+
195
+
196
+ <div id="validator-badges">
197
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
198
+ </div>
199
+
200
+ </body>
201
+ </html>
@@ -0,0 +1,243 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Hobix::BaseProperties::ClassMethods</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Hobix::BaseProperties::ClassMethods</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/hobix/base_rb.html">
59
+ lib/hobix/base.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ Returns the complete list of <a
78
+ href="ClassMethods.html#M000040">properties</a> for the immediate class. If
79
+ called on an inheriting class, inherited <a
80
+ href="ClassMethods.html#M000040">properties</a> are included.
81
+ </p>
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+ <div id="method-list">
89
+ <h3 class="section-bar">Methods</h3>
90
+
91
+ <div class="name-list">
92
+ <a href="#M000042">_</a>&nbsp;&nbsp;
93
+ <a href="#M000043">_!</a>&nbsp;&nbsp;
94
+ <a href="#M000041">prop_sections</a>&nbsp;&nbsp;
95
+ <a href="#M000040">properties</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Instance methods</h3>
116
+
117
+ <div id="method-M000042" class="method-detail">
118
+ <a name="M000042"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000042" class="method-signature">
122
+ <span class="method-name">_</span><span class="method-args">(name, opts = nil)</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p>
128
+ Quick property definitions in class definitions.
129
+ </p>
130
+ <p><a class="source-toggle" href="#"
131
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
132
+ <div class="method-source-code" id="M000042-source">
133
+ <pre>
134
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 251</span>
135
+ 251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-keyword kw">nil</span>
136
+ 252: <span class="ruby-ivar">@__props</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-constant">Omap</span>[]
137
+ 253: <span class="ruby-ivar">@__props</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">opts</span>
138
+ 254: <span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_defined?</span> <span class="ruby-node">&quot;#{ name }=&quot;</span>
139
+ 255: <span class="ruby-keyword kw">end</span>
140
+ </pre>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div id="method-M000043" class="method-detail">
146
+ <a name="M000043"></a>
147
+
148
+ <div class="method-heading">
149
+ <a href="#M000043" class="method-signature">
150
+ <span class="method-name">_!</span><span class="method-args">(name, opts = {})</span>
151
+ </a>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+ <p>
156
+ Property sections
157
+ </p>
158
+ <p><a class="source-toggle" href="#"
159
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
160
+ <div class="method-source-code" id="M000043-source">
161
+ <pre>
162
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 257</span>
163
+ 257: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_!</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span> = {}
164
+ 258: <span class="ruby-ivar">@__sects</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-constant">Omap</span>[]
165
+ 259: <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:__sect</span>] = <span class="ruby-ivar">@__props</span>.<span class="ruby-identifier">last</span>[<span class="ruby-value">0</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
166
+ 260: <span class="ruby-ivar">@__sects</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">opts</span>
167
+ 261: <span class="ruby-keyword kw">end</span>
168
+ </pre>
169
+ </div>
170
+ </div>
171
+ </div>
172
+
173
+ <div id="method-M000041" class="method-detail">
174
+ <a name="M000041"></a>
175
+
176
+ <div class="method-heading">
177
+ <a href="#M000041" class="method-signature">
178
+ <span class="method-name">prop_sections</span><span class="method-args">()</span>
179
+ </a>
180
+ </div>
181
+
182
+ <div class="method-description">
183
+ <p><a class="source-toggle" href="#"
184
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
185
+ <div class="method-source-code" id="M000041-source">
186
+ <pre>
187
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 241</span>
188
+ 241: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prop_sections</span>
189
+ 242: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:prop_sections</span>
190
+ 243: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">prop_sections</span>.<span class="ruby-identifier">dup</span>
191
+ 244: (<span class="ruby-ivar">@__sects</span> <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> }
192
+ 245: <span class="ruby-identifier">s</span>
193
+ 246: <span class="ruby-keyword kw">else</span>
194
+ 247: (<span class="ruby-ivar">@__sects</span> <span class="ruby-operator">||</span> {})
195
+ 248: <span class="ruby-keyword kw">end</span>
196
+ 249: <span class="ruby-keyword kw">end</span>
197
+ </pre>
198
+ </div>
199
+ </div>
200
+ </div>
201
+
202
+ <div id="method-M000040" class="method-detail">
203
+ <a name="M000040"></a>
204
+
205
+ <div class="method-heading">
206
+ <a href="#M000040" class="method-signature">
207
+ <span class="method-name">properties</span><span class="method-args">()</span>
208
+ </a>
209
+ </div>
210
+
211
+ <div class="method-description">
212
+ <p><a class="source-toggle" href="#"
213
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
214
+ <div class="method-source-code" id="M000040-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 232</span>
217
+ 232: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties</span>
218
+ 233: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:properties</span>
219
+ 234: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">dup</span>
220
+ 235: (<span class="ruby-ivar">@__props</span> <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> }
221
+ 236: <span class="ruby-identifier">s</span>
222
+ 237: <span class="ruby-keyword kw">else</span>
223
+ 238: (<span class="ruby-ivar">@__props</span> <span class="ruby-operator">||</span> {})
224
+ 239: <span class="ruby-keyword kw">end</span>
225
+ 240: <span class="ruby-keyword kw">end</span>
226
+ </pre>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+
232
+ </div>
233
+
234
+
235
+ </div>
236
+
237
+
238
+ <div id="validator-badges">
239
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
240
+ </div>
241
+
242
+ </body>
243
+ </html>
@@ -0,0 +1,218 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Hobix::BaseProperties</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Hobix::BaseProperties</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/hobix/base_rb.html">
59
+ lib/hobix/base.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000039">append_features</a>&nbsp;&nbsp;
84
+ <a href="#M000037">property_map</a>&nbsp;&nbsp;
85
+ <a href="#M000038">to_yaml_properties</a>&nbsp;&nbsp;
86
+ </div>
87
+ </div>
88
+
89
+ </div>
90
+
91
+
92
+ <!-- if includes -->
93
+
94
+ <div id="section">
95
+
96
+ <div id="class-list">
97
+ <h3 class="section-bar">Classes and Modules</h3>
98
+
99
+ Module <a href="BaseProperties/ClassMethods.html" class="link">Hobix::BaseProperties::ClassMethods</a><br />
100
+
101
+ </div>
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Class methods</h3>
112
+
113
+ <div id="method-M000039" class="method-detail">
114
+ <a name="M000039"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="#M000039" class="method-signature">
118
+ <span class="method-name">append_features</span><span class="method-args">(klass)</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ <p><a class="source-toggle" href="#"
124
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000039-source">
126
+ <pre>
127
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 286</span>
128
+ 286: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">append_features</span> <span class="ruby-identifier">klass</span>
129
+ 287: <span class="ruby-keyword kw">super</span>
130
+ 288: <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
131
+ 289: <span class="ruby-keyword kw">end</span>
132
+ </pre>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <h3 class="section-bar">Public Instance methods</h3>
138
+
139
+ <div id="method-M000037" class="method-detail">
140
+ <a name="M000037"></a>
141
+
142
+ <div class="method-heading">
143
+ <a href="#M000037" class="method-signature">
144
+ <span class="method-name">property_map</span><span class="method-args">()</span>
145
+ </a>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+ <p>
150
+ Build a simple map of properties
151
+ </p>
152
+ <p><a class="source-toggle" href="#"
153
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000037-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 264</span>
157
+ 264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">property_map</span>
158
+ 265: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
159
+ 266: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>
160
+ 267: <span class="ruby-identifier">yreq</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:req</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">:req</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:opt</span>
161
+ 268: [<span class="ruby-node">&quot;@#{ name }&quot;</span>, <span class="ruby-identifier">yreq</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">yreq</span>
162
+ 269: <span class="ruby-keyword kw">end</span>
163
+ 270: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">compact</span>
164
+ 271: <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <div id="method-M000038" class="method-detail">
171
+ <a name="M000038"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="#M000038" class="method-signature">
175
+ <span class="method-name">to_yaml_properties</span><span class="method-args">()</span>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+ <p>
181
+ Build a property map for the <a href="../YAML.html">YAML</a> module
182
+ </p>
183
+ <p><a class="source-toggle" href="#"
184
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
185
+ <div class="method-source-code" id="M000038-source">
186
+ <pre>
187
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 273</span>
188
+ 273: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_yaml_properties</span>
189
+ 274: <span class="ruby-identifier">property_map</span>.<span class="ruby-identifier">find_all</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">req</span><span class="ruby-operator">|</span>
190
+ 275: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">req</span>
191
+ 276: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:opt</span>
192
+ 277: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-identifier">prop</span> ).<span class="ruby-identifier">nil?</span>
193
+ 278: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:req</span>
194
+ 279: <span class="ruby-keyword kw">true</span>
195
+ 280: <span class="ruby-keyword kw">end</span>
196
+ 281: <span class="ruby-keyword kw">end</span>.
197
+ 282: <span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">req</span><span class="ruby-operator">|</span>
198
+ 283: <span class="ruby-identifier">prop</span>
199
+ 284: <span class="ruby-keyword kw">end</span>
200
+ 285: <span class="ruby-keyword kw">end</span>
201
+ </pre>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+
207
+ </div>
208
+
209
+
210
+ </div>
211
+
212
+
213
+ <div id="validator-badges">
214
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
215
+ </div>
216
+
217
+ </body>
218
+ </html>