Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

starting to convert this into a hobix site

  • Loading branch information...
commit 123b33f8676379eebeb1d7eac6a862a9262ae37b 1 parent 9eeb01e
@cndreisbach cndreisbach authored
Showing with 20,640 additions and 212 deletions.
  1. +758 −0 doc/rdoc/classes/Hobix.html
  2. +462 −0 doc/rdoc/classes/Hobix/API.html
  3. +110 −0 doc/rdoc/classes/Hobix/Article.html
  4. +880 −0 doc/rdoc/classes/Hobix/BaseContent.html
  5. +251 −0 doc/rdoc/classes/Hobix/BaseEntry.html
  6. +229 −0 doc/rdoc/classes/Hobix/BaseFacet.html
  7. +124 −0 doc/rdoc/classes/Hobix/BaseOutput.html
  8. +223 −0 doc/rdoc/classes/Hobix/BasePlugin.html
  9. +247 −0 doc/rdoc/classes/Hobix/BaseProperties.html
  10. +277 −0 doc/rdoc/classes/Hobix/BaseProperties/ClassMethods.html
  11. +159 −0 doc/rdoc/classes/Hobix/BasePublish.html
  12. +499 −0 doc/rdoc/classes/Hobix/BaseStorage.html
  13. +509 −0 doc/rdoc/classes/Hobix/BixWik.html
  14. +227 −0 doc/rdoc/classes/Hobix/BixWik/Entry.html
  15. +190 −0 doc/rdoc/classes/Hobix/BixWik/IndexEntry.html
  16. +110 −0 doc/rdoc/classes/Hobix/BixWik/WikiRedCloth.html
  17. +173 −0 doc/rdoc/classes/Hobix/BixWikPlugin.html
  18. +2,464 −0 doc/rdoc/classes/Hobix/CommandLine.html
  19. +114 −0 doc/rdoc/classes/Hobix/Comment.html
  20. +249 −0 doc/rdoc/classes/Hobix/Config.html
  21. +841 −0 doc/rdoc/classes/Hobix/DataMarsh.html
  22. +180 −0 doc/rdoc/classes/Hobix/Entry.html
  23. +173 −0 doc/rdoc/classes/Hobix/EntryEnum.html
  24. +180 −0 doc/rdoc/classes/Hobix/Enumerable.html
  25. +108 −0 doc/rdoc/classes/Hobix/Facets.html
  26. +205 −0 doc/rdoc/classes/Hobix/Facets/WikiEdit.html
  27. +206 −0 doc/rdoc/classes/Hobix/LinkList.html
  28. +128 −0 doc/rdoc/classes/Hobix/Out.html
  29. +500 −0 doc/rdoc/classes/Hobix/Out/Quick.html
  30. +461 −0 doc/rdoc/classes/Hobix/Page.html
  31. +114 −0 doc/rdoc/classes/Hobix/Trackback.html
  32. +224 −0 doc/rdoc/classes/Hobix/UriStr.html
  33. +1,779 −0 doc/rdoc/classes/Hobix/WebApp.html
  34. +238 −0 doc/rdoc/classes/Hobix/WebApp/QueryString.html
  35. +110 −0 doc/rdoc/classes/Hobix/WebApp/QueryValidationFailure.html
  36. +2,540 −0 doc/rdoc/classes/Hobix/Weblog.html
  37. +110 −0 doc/rdoc/classes/Hobix/Weblog/AuthorNotFound.html
  38. +148 −0 doc/rdoc/classes/Kernel.html
  39. +166 −0 doc/rdoc/classes/Regexp.html
  40. +108 −0 doc/rdoc/classes/YAML.html
  41. +156 −0 doc/rdoc/classes/YAML/Omap.html
  42. +1 −0  doc/rdoc/created.rid
  43. +119 −0 doc/rdoc/files/COPYING.html
  44. +121 −0 doc/rdoc/files/README.html
  45. +415 −0 doc/rdoc/files/doc/CHANGELOG.html
  46. +109 −0 doc/rdoc/files/lib/hobix/api_rb.html
  47. +120 −0 doc/rdoc/files/lib/hobix/article_rb.html
  48. +124 −0 doc/rdoc/files/lib/hobix/base_rb.html
  49. +120 −0 doc/rdoc/files/lib/hobix/bixwik_rb.html
  50. +148 −0 doc/rdoc/files/lib/hobix/commandline_rb.html
  51. +119 −0 doc/rdoc/files/lib/hobix/comments_rb.html
  52. +118 −0 doc/rdoc/files/lib/hobix/config_rb.html
  53. +100 −0 doc/rdoc/files/lib/hobix/datamarsh_rb.html
  54. +108 −0 doc/rdoc/files/lib/hobix/entry_rb.html
  55. +122 −0 doc/rdoc/files/lib/hobix/linklist_rb.html
  56. +119 −0 doc/rdoc/files/lib/hobix/publisher_rb.html
  57. +123 −0 doc/rdoc/files/lib/hobix/trackbacks_rb.html
  58. +130 −0 doc/rdoc/files/lib/hobix/webapp_rb.html
  59. +136 −0 doc/rdoc/files/lib/hobix/weblog_rb.html
  60. +122 −0 doc/rdoc/files/lib/hobix_rb.html
  61. +105 −0 doc/rdoc/fr_class_index.html
  62. +59 −0 doc/rdoc/fr_file_index.html
  63. +587 −0 doc/rdoc/fr_method_index.html
  64. +21 −0 doc/rdoc/index.html
  65. +299 −0 doc/rdoc/rdoc-style.css
  66. +19 −30 school/hobix.out.quick
  67. +37 −46 school/htdocs/2009/08/index.html
  68. +37 −46 school/htdocs/2009/index.html
  69. +28 −37 school/htdocs/hobix-default-entry.html
  70. +2 −2 school/htdocs/index.atom
  71. +37 −46 school/htdocs/index.html
  72. +2 −2 school/htdocs/index.xml
  73. +3 −3 school/htdocs/index.yaml
View
758 doc/rdoc/classes/Hobix.html
@@ -0,0 +1,758 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: Hobix [The Book of Hobix]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">Hobix</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../files/lib/hobix_rb.html">
+
+ lib/hobix.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/api_rb.html">
+
+ lib/hobix/api.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/article_rb.html">
+
+ lib/hobix/article.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/base_rb.html">
+
+ lib/hobix/base.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/bixwik_rb.html">
+
+ lib/hobix/bixwik.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/commandline_rb.html">
+
+ lib/hobix/commandline.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/comments_rb.html">
+
+ lib/hobix/comments.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/config_rb.html">
+
+ lib/hobix/config.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/datamarsh_rb.html">
+
+ lib/hobix/datamarsh.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/entry_rb.html">
+
+ lib/hobix/entry.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/linklist_rb.html">
+
+ lib/hobix/linklist.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/trackbacks_rb.html">
+
+ lib/hobix/trackbacks.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/webapp_rb.html">
+
+ lib/hobix/webapp.rb
+
+ </a>
+
+
+ <br />
+
+
+ <a href="../files/lib/hobix/weblog_rb.html">
+
+ lib/hobix/weblog.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <h1><a href="Hobix.html">Hobix</a></h1>
+<p>
+<a href="Hobix.html">Hobix</a> is a complete blogging system, designed to
+be managed on the file system and accessed through a command-line
+application.
+</p>
+<p>
+The command-line application is powered by this Ruby library which is
+designed to be fully scriptable and extensible.
+</p>
+<h1>Module Map</h1>
+<p>
+Here is a map of the core modules which are loaded when you require
+&#8216;hobix&#8217; in your script.
+</p>
+<table>
+<tr><td valign="top">Hobix::Weblog:</td><td>Generally, this module is the starting point. Load a weblog&#8217;s
+configuration into a <a href="Hobix/Weblog.html">Hobix::Weblog</a> object,
+which can be used to query entries, generate pages, and edit any part of
+the site. (from &#8216;hobix/weblog&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Page:</td><td>Whenever a template is generated into output, a <a
+href="Hobix/Page.html">Page</a> object is passed in, describing the links
+to neighboring pages and update time. (from &#8216;hobix/weblog&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Entry:</td><td>Using an entry&#8217;s id (or shortName), you can load <a
+href="Hobix/Entry.html">Entry</a> objects, which contain all the content
+and rendering details for an entry. (from &#8216;hobix/entry&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::EntryEnum:</td><td>When <a href="Hobix.html">Hobix</a> supplies a template with a list of
+entry classes, this module is mixed in. (from &#8216;hobix/entry&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::LinkList:</td><td>An <a href="Hobix/Entry.html">Entry</a> subclass, used for storing links.
+(from &#8216;hobix/linklist&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::BasePlugin:</td><td>All <a href="Hobix.html">Hobix</a> plugins inherit from this class. The
+class uses Ruby&#8217;s <tt>inherited</tt> hook to identify plugins. (from
+&#8216;hobix/base&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::BaseStorage:</td><td>All storage plugins inherit from this class. Storage plugins exclusively
+store the weblog entries. (from &#8216;hobix/base&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::BaseOutput:</td><td>All output plugins inherit from this class. Output plugins are attached to
+specific template types and they feed entries into the template. (from
+&#8216;hobix/base&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::BasePublish:</td><td>All publisher plugins inherit from this class. Publisher plugins are
+notified when certain pages are updated. For example, the <tt>ping</tt>
+plugin will ping blog directories if the `index&#8217; pages are updated.
+(from &#8216;hobix/base&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Config:</td><td>Users individually store their personal settings and weblog paths in
+.hobixrc. This class is used to load and manipulate the settings file.
+(from &#8216;hobix/config&#8217;)
+
+</td></tr>
+</table>
+<p>
+<a href="Hobix.html">Hobix</a> comes with a few plugins, for which
+documentation is also available.
+</p>
+<table>
+<tr><td valign="top">Hobix::Storage::Filesys:</td><td>This plugin stores entries in separate <a href="YAML.html">YAML</a> files.
+Directories can be used to categorize and organize entries. (from
+&#8216;hobix/storage/filesys&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Out::ERB:</td><td>This output plugin handles .erb templates. <a
+href="Hobix/Page.html">Page</a> and entry data are passed in as variables.
+ERuby markup is used in the document to script against those variables.
+(from &#8216;hobix/out/erb&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Out::RedRum:</td><td>This output plugin handles .redrum templates. These templates contain ERuby
+as well. The output generated by the page is passed through RedCloth, a
+Textile processor. This way, you can write your templates in Textile with
+ERuby scripting. (from &#8216;hobix/out/redrum&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Out::RSS:</td><td>This output plugin handles .rss templates. These templates are empty and
+simply signify to the plugin that an RSS 2.0 feed should be generated for
+the entry data. (from &#8216;hobix/out/rss&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Out::Atom:</td><td>This output plugin handles .atom templates. Just like the RSS plugin, but
+generates an Atom feed. (from &#8216;hobix/out/atom&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Out::OkayNews:</td><td>This output plugin handles .okaynews templates. Just like the Atom and RSS
+plugins, but generates !okay/news, a <a href="YAML.html">YAML</a>
+syndication feed. (from &#8216;hobix/out/okaynews&#8217;)
+
+</td></tr>
+<tr><td valign="top">Hobix::Publish::Ping:</td><td>This publisher plugin pings blog directories when the &#8216;index&#8217;
+pages are published on a regen or upgen.
+
+</td></tr>
+</table>
+<h1>Examples</h1>
+<p>
+Here are a few short examples to give you a feel for how <a
+href="Hobix.html">Hobix</a> can be scripted. Refer to individual
+module&#8217;s documentation for more.
+</p>
+<h2>Example 1: Regenerating a weblog</h2>
+<p>
+The first step is to load the <a href="Hobix/Weblog.html">Weblog</a>
+object.
+</p>
+<pre>
+ require 'hobix'
+ weblog = Hobix::Weblog.load( '/my/blahhg/hobix.yaml' )
+</pre>
+<p>
+With the weblog loaded, we&#8217;ll now want to load a template. Templates
+are stored in the weblog&#8217;s <tt>skel_path</tt> accessor.
+</p>
+<pre>
+ tpl_path = File.join( weblog.skel_path, 'index.html.erb' )
+</pre>
+<p>
+We give the path to the editor. When we are done editing, the editor saves
+to the original path. We can then trigger a rebuild.
+</p>
+<pre>
+ weblog.regenerate :update
+</pre>
+<p>
+The :update indicates that not every file will be regenerated, only those
+affected by the change.
+</p>
+<h2>Example 2: E-mail notify on publish</h2>
+<p>
+Publisher plugins are used to perform actions when the site has an upgen or
+regen. <a href="Hobix.html">Hobix</a> plugins are absolutely the simplest
+Ruby coding ever. Watch.
+</p>
+<pre>
+ require 'net/smtp'
+
+ module Hobix::Publish
+ class Email &lt; Hobix::BasePublish
+ def initialize( weblog, emails ); end
+ def watch; ['entry']; end
+ def publish( page_name ); end
+ end
+ end
+</pre>
+<p>
+This plugin doesn&#8217;t do anything yet. But it won&#8217;t throw any
+errors. This is our skeleton for a plugin that will e-mail us when there
+are updates to the site.
+</p>
+<p>
+The <tt>watch</tt> method monitors certain page prefixes. The `entry&#8217;
+prefix indicates that this publish plugin looks for changes to any entry on
+the site.
+</p>
+<p>
+The <tt>initialize</tt> method is important as well. It receives the
++Hobix::Weblog+ object the publishing took place on. The <em>emails</em>
+parameter is supplied a list of e-mail address from the weblog&#8217;s
+hobix.yaml configuration.
+</p>
+<p>
+When a plugin is initialized it is given the weblog object and any data
+which is supplied in the weblog configuration. Here is what the hobix.yaml
+looks like:
+</p>
+<pre>
+ requires:
+ - hobix/storage/filesys
+ - hobix/out/erb
+ - hobix/publish/ping: [http://ping.blo.gs:80/]
+</pre>
+<p>
+In the above configuration, an Array is passed to the Ping plugin. So
+that&#8217;s what we&#8217;ll receive here.
+</p>
+<p>
+To get our e-mail sending, let&#8217;s fill in the <tt>initialize</tt> and
+<tt>publish</tt> methods.
+</p>
+<pre>
+ def initialize( weblog, emails )
+ @weblog = weblog
+ @emails = emails
+ end
+ def publish( page_name )
+ Net::SMTP.start( 'localhost', 25 ) do |smtp|
+ @emails.each do |email|
+ smtp.send_message &lt;&lt;MSG, 'your@site.com', email
+ From: your@site.com
+ To: #{ email }
+
+ The site has been updated.
+ MSG
+ end
+ end
+ end
+</pre>
+<hr size="1"></hr><h1>hobix/api.rb</h1>
+<p>
+<a href="Hobix.html">Hobix</a> <a href="Hobix/API.html">API</a>, used by
+any external service (DRb or REST, etc.)
+</p>
+<p>
+Copyright &#169; 2003-2004 why the lucky stiff
+</p>
+<p>
+Written &amp; maintained by why the lucky stiff <why@ruby-lang.org>
+</p>
+<p>
+This program is free software, released under a BSD license. See <a
+href="../files/COPYING.html">COPYING</a> for details.
+</p>
+<hr size="1"></hr><p>
+Marshal + DBM = <a href="Hobix/DataMarsh.html">DataMarsh</a>
+</p>
+<ul>
+<li>Same interface as DBM class
+
+</li>
+</ul>
+<hr size="1"></hr><h1>hobix/entry.rb</h1>
+<p>
+<a href="Hobix.html">Hobix</a> command-line weblog system.
+</p>
+<p>
+Copyright &#169; 2003-2004 why the lucky stiff
+</p>
+<p>
+Written &amp; maintained by why the lucky stiff <why@ruby-lang.org>
+</p>
+<p>
+This program is free software, released under a BSD license. See <a
+href="../files/COPYING.html">COPYING</a> for details.
+</p>
+<hr size="1"></hr><p>
+The <a href="Hobix/LinkList.html">LinkList</a> class is an entry type for
+storing links. It&#8217;s also a good example of how to subclass the <a
+href="Hobix/Entry.html">Entry</a> class so you can store your own kinds of
+entries.
+</p>
+<h2>Properties</h2>
+<p>
+The <a href="Hobix/LinkList.html">LinkList</a> responds to many of the same
+properties listed in the +Hobix::Entry+ class. The primary difference is
+that, instead of having a <tt>content</tt> property, there is a
+<tt>links</tt> property.
+</p>
+<table>
+<tr><td valign="top">links:</td><td>Internally, this class stores a +YAML::Omap+, an Array of pairs. The links
+are kept in the order shown in the <a href="YAML.html">YAML</a> file. They
+consist of a link title, paired with a URL.
+
+</td></tr>
+</table>
+<h2>Sample <a href="Hobix/LinkList.html">LinkList</a></h2>
+<pre>
+ --- %YAML:1.0 !hobix.com,2004/linklist
+ title: Hobix Links
+ author: why
+ created: 2004-05-30 18:53:00 -06:00
+ links:
+ - Hobix: http://hobix.com/
+ - Learn Hobix: http://hobix.com/learn/
+ - Textile Reference: http://hobix.com/textile/
+</pre>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000003">WebApp</a>&nbsp;&nbsp;
+
+ <a href="#M000002">const_find</a>&nbsp;&nbsp;
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Module <a href="Hobix/BaseProperties.html" class="link">Hobix::BaseProperties</a><br />
+Module <a href="Hobix/BixWik.html" class="link">Hobix::BixWik</a><br />
+Module <a href="Hobix/CommandLine.html" class="link">Hobix::CommandLine</a><br />
+Module <a href="Hobix/EntryEnum.html" class="link">Hobix::EntryEnum</a><br />
+Module <a href="Hobix/Enumerable.html" class="link">Hobix::Enumerable</a><br />
+Module <a href="Hobix/Facets.html" class="link">Hobix::Facets</a><br />
+Module <a href="Hobix/Out.html" class="link">Hobix::Out</a><br />
+Module <a href="Hobix/UriStr.html" class="link">Hobix::UriStr</a><br />
+Class <a href="Hobix/API.html" class="link">Hobix::API</a><br />
+Class <a href="Hobix/Article.html" class="link">Hobix::Article</a><br />
+Class <a href="Hobix/BaseContent.html" class="link">Hobix::BaseContent</a><br />
+Class <a href="Hobix/BaseEntry.html" class="link">Hobix::BaseEntry</a><br />
+Class <a href="Hobix/BaseFacet.html" class="link">Hobix::BaseFacet</a><br />
+Class <a href="Hobix/BaseOutput.html" class="link">Hobix::BaseOutput</a><br />
+Class <a href="Hobix/BasePlugin.html" class="link">Hobix::BasePlugin</a><br />
+Class <a href="Hobix/BasePublish.html" class="link">Hobix::BasePublish</a><br />
+Class <a href="Hobix/BaseStorage.html" class="link">Hobix::BaseStorage</a><br />
+Class <a href="Hobix/BixWikPlugin.html" class="link">Hobix::BixWikPlugin</a><br />
+Class <a href="Hobix/Comment.html" class="link">Hobix::Comment</a><br />
+Class <a href="Hobix/Config.html" class="link">Hobix::Config</a><br />
+Class <a href="Hobix/DataMarsh.html" class="link">Hobix::DataMarsh</a><br />
+Class <a href="Hobix/Entry.html" class="link">Hobix::Entry</a><br />
+Class <a href="Hobix/LinkList.html" class="link">Hobix::LinkList</a><br />
+Class <a href="Hobix/Page.html" class="link">Hobix::Page</a><br />
+Class <a href="Hobix/Trackback.html" class="link">Hobix::Trackback</a><br />
+Class <a href="Hobix/WebApp.html" class="link">Hobix::WebApp</a><br />
+Class <a href="Hobix/Weblog.html" class="link">Hobix::Weblog</a><br />
+
+ </div>
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">VERSION</td>
+ <td>=</td>
+ <td class="context-item-value">'0.5'</td>
+
+ <td>&nbsp;</td>
+ <td class="context-item-desc">
+Version used to compare installations
+
+</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">CVS_ID</td>
+ <td>=</td>
+ <td class="context-item-value">&quot;$Id$&quot;</td>
+
+ <td>&nbsp;</td>
+ <td class="context-item-desc">
+CVS information
+
+</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">CVS_REV</td>
+ <td>=</td>
+ <td class="context-item-value">&quot;$Revision$&quot;[11..-3]</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">SHARE_PATH</td>
+ <td>=</td>
+ <td class="context-item-value">share_path</td>
+
+ </tr>
+
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">SHARE_PATH</td>
+ <td>=</td>
+ <td class="context-item-value">&quot;#{ ::Config::CONFIG['datadir'] }/hobix/&quot;</td>
+
+ </tr>
+
+ </table>
+ </div>
+ </div>
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000003" class="method-signature">
+
+ <span class="method-name">WebApp</span><span class="method-args">() {|webapp| ...}</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+<a href="Hobix.html#M000003">WebApp</a> is a main routine of web
+application. It should be called from a toplevel of a
+CGI/FastCGI/mod_ruby/WEBrick script.
+</p>
+<p>
+<a href="Hobix.html#M000003">WebApp</a> is used as follows.
+</p>
+<pre>
+ #!/usr/bin/env ruby
+
+ require 'webapp'
+
+ ... class/method definitions ... # run once per process.
+
+ WebApp {|webapp| # This block runs once per request.
+ ... process a request ...
+ }
+</pre>
+<p>
+<a href="Hobix.html#M000003">WebApp</a> yields with an object of the class
+<a href="Hobix.html#M000003">WebApp</a>. The object contains request and
+response.
+</p>
+<p>
+<a href="Hobix.html#M000003">WebApp</a> rise $SAFE to 1.
+</p>
+<p>
+<a href="Hobix.html#M000003">WebApp</a> catches all kind of exception
+raised in the block. If HTTP connection is made from localhost or a
+developper host, the backtrace is sent back to the browser. Otherwise, the
+backtrace is sent to stderr usually which is redirected to error.log. The
+developper hosts are specified by the environment variable
+WEBAPP_DEVELOP_HOST. It may be an IP address such as
+&#8220;111.222.333.444&#8220; or an network address such as
+&#8220;111.222.333.0/24&#8220;. (An environment variable for CGI can be set
+by SetEnv directive in Apache.)
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000003-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/webapp.rb, line 693</span>
+693: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">WebApp</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-comment cmt"># :yields: webapp</span>
+694: <span class="ruby-identifier">$SAFE</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$SAFE</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
+695: <span class="ruby-identifier">manager</span> = <span class="ruby-constant">WebApp</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">block</span>)
+696: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Apache</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Apache</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Apache</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>)
+697: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_rbx</span> }
+698: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webrick_load_servlet</span>]
+699: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_webrick</span> }
+700: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:stat</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">stat</span>.<span class="ruby-identifier">socket?</span> <span class="ruby-operator">&amp;&amp;</span>
+701: <span class="ruby-keyword kw">begin</span>
+702: <span class="ruby-comment cmt"># getpeername(FCGI_LISTENSOCK_FILENO) causes ENOTCONN on FastCGI</span>
+703: <span class="ruby-comment cmt"># cf. http://www.fastcgi.com/devkit/doc/fcgi-spec.html</span>
+704: <span class="ruby-identifier">require</span> <span class="ruby-value str">'socket'</span>
+705: <span class="ruby-identifier">sock</span> = <span class="ruby-constant">Socket</span>.<span class="ruby-identifier">for_fd</span>(<span class="ruby-value">0</span>)
+706: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">getpeername</span>
+707: <span class="ruby-keyword kw">false</span>
+708: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOTCONN</span>
+709: <span class="ruby-keyword kw">true</span>
+710: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>
+711: <span class="ruby-keyword kw">false</span>
+712: <span class="ruby-keyword kw">end</span>
+713: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_fcgi</span> }
+714: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'REQUEST_METHOD'</span>)
+715: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_cgi</span> }
+716: <span class="ruby-keyword kw">else</span>
+717: <span class="ruby-identifier">require</span> <span class="ruby-value str">'hobix/webapp/cli'</span>
+718: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_cli</span> }
+719: <span class="ruby-keyword kw">end</span>
+720: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webapp_delay</span>]
+721: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webapp_proc</span>] = <span class="ruby-identifier">run</span>
+722: <span class="ruby-keyword kw">else</span>
+723: <span class="ruby-identifier">run</span>.<span class="ruby-identifier">call</span>
+724: <span class="ruby-keyword kw">end</span>
+725: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000002" class="method-detail">
+ <a name="M000002"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000002" class="method-signature">
+
+ <span class="method-name">const_find</span><span class="method-args">( tclass )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Get a top-level constant from a string
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000002-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix.rb, line 224</span>
+224: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_find</span>( <span class="ruby-identifier">tclass</span> )
+225: <span class="ruby-identifier">obj_class</span> = <span class="ruby-constant">Object</span>
+226: <span class="ruby-identifier">tclass</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">&quot;::&quot;</span> ).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">obj_class</span> = <span class="ruby-identifier">obj_class</span>.<span class="ruby-identifier">const_get</span>( <span class="ruby-identifier">c</span> ) }
+227: <span class="ruby-identifier">obj_class</span>
+228: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+
+ </div>
+
+
+
+
+ </div>
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
462 doc/rdoc/classes/Hobix/API.html
@@ -0,0 +1,462 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Hobix::API [The Book of Hobix]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Hobix::API</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../../files/lib/hobix/api_rb.html">
+
+ lib/hobix/api.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+
+ <a href="BaseFacet.html">
+
+ Hobix::BaseFacet
+
+ </a>
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+The <a href="API.html">API</a> facet
+</p>
+
+ </div>
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000109">edit_action</a>&nbsp;&nbsp;
+
+ <a href="#M000102">get</a>&nbsp;&nbsp;
+
+ <a href="#M000106">list_action</a>&nbsp;&nbsp;
+
+ <a href="#M000101">new</a>&nbsp;&nbsp;
+
+ <a href="#M000105">new_action</a>&nbsp;&nbsp;
+
+ <a href="#M000108">post_action</a>&nbsp;&nbsp;
+
+ <a href="#M000104">regen_action</a>&nbsp;&nbsp;
+
+ <a href="#M000107">search_action</a>&nbsp;&nbsp;
+
+ <a href="#M000103">upgen_action</a>&nbsp;&nbsp;
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000101" class="method-detail">
+ <a name="M000101"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000101" class="method-signature">
+
+ <span class="method-name">new</span><span class="method-args">( weblog, defaults = {} )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000101-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 21</span>
+21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">weblog</span>, <span class="ruby-identifier">defaults</span> = {} )
+22: <span class="ruby-ivar">@weblog</span> = <span class="ruby-identifier">weblog</span>
+23: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000109" class="method-detail">
+ <a name="M000109"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000109" class="method-signature">
+
+ <span class="method-name">edit_action</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000109-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 79</span>
+79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit_action</span>
+80: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_method</span>
+81: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;GET&quot;</span>
+82: <span class="ruby-ivar">@weblog</span>
+83: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;POST&quot;</span>
+84: <span class="ruby-identifier">config</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_body</span> )
+85: <span class="ruby-identifier">config</span>.<span class="ruby-identifier">save</span> <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">hobix_yaml</span>
+86: <span class="ruby-value str">&quot;Weblog configuration saved.&quot;</span>
+87: <span class="ruby-keyword kw">end</span>
+88: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000102" class="method-detail">
+ <a name="M000102"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000102" class="method-signature">
+
+ <span class="method-name">get</span><span class="method-args">(app)</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000102-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 24</span>
+24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span> <span class="ruby-identifier">app</span>
+25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:action_uri</span>
+26: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">protect</span> <span class="ruby-identifier">app</span>, <span class="ruby-ivar">@weblog</span>
+27: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
+28: <span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">action</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> = <span class="ruby-identifier">app</span>.<span class="ruby-identifier">action_uri</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'/'</span> )
+29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;remote&quot;</span>
+30: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-node">&quot;#{ action }_action&quot;</span>
+31: <span class="ruby-keyword kw">begin</span>
+32: <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">method</span>( <span class="ruby-node">&quot;#{ action }_action&quot;</span> ).<span class="ruby-identifier">call</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> ).<span class="ruby-identifier">to_yaml</span>
+33: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+34: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
+35: <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_yaml</span>
+36: <span class="ruby-keyword kw">end</span>
+37: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
+38: <span class="ruby-keyword kw">end</span>
+39: <span class="ruby-keyword kw">end</span>
+40: <span class="ruby-keyword kw">end</span>
+41: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000106" class="method-detail">
+ <a name="M000106"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000106" class="method-signature">
+
+ <span class="method-name">list_action</span><span class="method-args">( *inpath )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000106-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 57</span>
+57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_action</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">inpath</span> )
+58: <span class="ruby-identifier">inpath</span> = <span class="ruby-identifier">inpath</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
+59: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">find</span>( <span class="ruby-identifier">:all</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:inpath</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inpath</span> )
+60: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000105" class="method-detail">
+ <a name="M000105"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000105" class="method-signature">
+
+ <span class="method-name">new_action</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000105-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 53</span>
+53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_action</span>
+54: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">entry_class</span>.<span class="ruby-identifier">new</span>
+55: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000108" class="method-detail">
+ <a name="M000108"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000108" class="method-signature">
+
+ <span class="method-name">post_action</span><span class="method-args">( *id )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000108-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 67</span>
+67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_action</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">id</span> )
+68: <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
+69: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_method</span>
+70: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;GET&quot;</span>
+71: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">load_entry</span> <span class="ruby-identifier">id</span>
+72: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;POST&quot;</span>
+73: <span class="ruby-identifier">entry</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_body</span> )
+74: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">save_entry</span> <span class="ruby-identifier">id</span>, <span class="ruby-identifier">entry</span>
+75: <span class="ruby-value str">&quot;Entry successfully saved.&quot;</span>
+76: <span class="ruby-keyword kw">end</span>
+77: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000104" class="method-detail">
+ <a name="M000104"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000104" class="method-signature">
+
+ <span class="method-name">regen_action</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000104-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 48</span>
+48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">regen_action</span>
+49: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">regenerate</span>
+50: <span class="ruby-value str">&quot;Regeneration complete&quot;</span>
+51: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000107" class="method-detail">
+ <a name="M000107"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000107" class="method-signature">
+
+ <span class="method-name">search_action</span><span class="method-args">( words, *inpath )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000107-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 62</span>
+62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_action</span>( <span class="ruby-identifier">words</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">inpath</span> )
+63: <span class="ruby-identifier">inpath</span> = <span class="ruby-identifier">inpath</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
+64: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">find</span>( <span class="ruby-identifier">:all</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:inpath</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inpath</span>, <span class="ruby-identifier">:search</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">words</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">','</span> ) )
+65: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000103" class="method-detail">
+ <a name="M000103"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000103" class="method-signature">
+
+ <span class="method-name">upgen_action</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000103-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/api.rb, line 43</span>
+43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upgen_action</span>
+44: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">regenerate</span>( <span class="ruby-identifier">:update</span> )
+45: <span class="ruby-value str">&quot;Regeneration complete&quot;</span>
+46: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+
+ </div>
+
+
+
+
+ </div>
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
110 doc/rdoc/classes/Hobix/Article.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Hobix::Article [The Book of Hobix]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Hobix::Article</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../../files/lib/hobix/article_rb.html">
+
+ lib/hobix/article.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+
+ Object
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ </div>
+
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+
+
+
+ </div>
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
880 doc/rdoc/classes/Hobix/BaseContent.html
@@ -0,0 +1,880 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Hobix::BaseContent [The Book of Hobix]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Hobix::BaseContent</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+
+
+ <a href="../../files/lib/hobix/base_rb.html">
+
+ lib/hobix/base.rb
+
+ </a>
+
+
+ <br />
+
+ </td>
+ </tr>
+
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+
+ Object
+
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+ <div id="contextContent">
+
+ </div>
+
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+
+ <a href="#M000181">base_id</a>&nbsp;&nbsp;
+
+ <a href="#M000189">canonical_tags</a>&nbsp;&nbsp;
+
+ <a href="#M000177">day_id</a>&nbsp;&nbsp;
+
+ <a href="#M000184">force_tags</a>&nbsp;&nbsp;
+
+ <a href="#M000183">link_format</a>&nbsp;&nbsp;
+
+ <a href="#M000194">load</a>&nbsp;&nbsp;
+
+ <a href="#M000197">maker</a>&nbsp;&nbsp;
+
+ <a href="#M000178">month_id</a>&nbsp;&nbsp;
+
+ <a href="#M000176">new</a>&nbsp;&nbsp;
+
+ <a href="#M000185">no_implicit_tags</a>&nbsp;&nbsp;
+
+ <a href="#M000188">path_to_tags</a>&nbsp;&nbsp;
+
+ <a href="#M000186">root_tag=</a>&nbsp;&nbsp;
+
+ <a href="#M000180">section_id</a>&nbsp;&nbsp;
+
+ <a href="#M000187">split_implicit_tags</a>&nbsp;&nbsp;
+
+ <a href="#M000190">tags</a>&nbsp;&nbsp;
+
+ <a href="#M000195">text_processor</a>&nbsp;&nbsp;
+
+ <a href="#M000196">text_processor_fields</a>&nbsp;&nbsp;
+
+ <a href="#M000192">to_yaml</a>&nbsp;&nbsp;
+
+ <a href="#M000193">to_yaml_orig</a>&nbsp;&nbsp;
+
+ <a href="#M000182">url_link</a>&nbsp;&nbsp;
+
+ <a href="#M000191">yaml_type</a>&nbsp;&nbsp;
+
+ <a href="#M000179">year_id</a>&nbsp;&nbsp;
+
+ </div>
+ </div>
+
+ </div>
+
+ <!-- if includes -->
+
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+
+ <span class="include-name"><a href="BaseProperties.html">BaseProperties</a></span>
+
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+
+ <!-- if method_list -->
+
+ <div id="methods">
+
+ <h3 class="section-bar">Public Class methods</h3>
+
+
+ <div id="method-M000183" class="method-detail">
+ <a name="M000183"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000183" class="method-signature">
+
+ <span class="method-name">link_format</span><span class="method-args">( e )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000183-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 319</span>
+319: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">link_format</span>( <span class="ruby-identifier">e</span> ); <span class="ruby-identifier">e</span>.<span class="ruby-identifier">id</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000194" class="method-detail">
+ <a name="M000194"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000194" class="method-signature">
+
+ <span class="method-name">load</span><span class="method-args">( file )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Load the weblog entry from a file.
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000194-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 410</span>
+410: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load</span>( <span class="ruby-identifier">file</span> )
+411: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">file</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-identifier">f</span> ) }
+412: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000197" class="method-detail">
+ <a name="M000197"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000197" class="method-signature">
+
+ <span class="method-name">maker</span><span class="method-args">( val )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Factory method for generating <a href="Entry.html">Entry</a> classes from a
+hash. Used by the <a href="../YAML.html">YAML</a> loader.
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000197-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 425</span>
+425: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">maker</span>( <span class="ruby-identifier">val</span> )
+426: <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">text_processor_fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
+427: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:value</span>
+428: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">value</span>
+429: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_html</span>
+430: <span class="ruby-keyword kw">self</span>
+431: <span class="ruby-keyword kw">end</span>
+432: <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>] = <span class="ruby-identifier">str</span>
+433: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_str</span>
+434: <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>] = <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">text_processor</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">val</span>[<span class="ruby-identifier">f</span>].<span class="ruby-identifier">to_str</span> )
+435: <span class="ruby-keyword kw">end</span>
+436: <span class="ruby-keyword kw">end</span>
+437: <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">object_maker</span>( <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span> )
+438: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000176" class="method-detail">
+ <a name="M000176"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000176" class="method-signature">
+
+ <span class="method-name">new</span><span class="method-args">() {|self if block_given?;| ...}</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000176-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 312</span>
+312: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>; <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000185" class="method-detail">
+ <a name="M000185"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000185" class="method-signature">
+
+ <span class="method-name">no_implicit_tags</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000185-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000185-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 327</span>
+327: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">no_implicit_tags</span>
+328: <span class="ruby-ivar">@@no_implicit_tags</span> = <span class="ruby-keyword kw">true</span>
+329: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000186" class="method-detail">
+ <a name="M000186"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000186" class="method-signature">
+
+ <span class="method-name">root_tag=</span><span class="method-args">( tag )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000186-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000186-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 336</span>
+336: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_tag=</span>( <span class="ruby-identifier">tag</span> )
+337: <span class="ruby-ivar">@@root_tag</span> = <span class="ruby-identifier">tag</span>
+338: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000187" class="method-detail">
+ <a name="M000187"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000187" class="method-signature">
+
+ <span class="method-name">split_implicit_tags</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000187-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 347</span>
+347: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split_implicit_tags</span>
+348: <span class="ruby-ivar">@@split_implicit_tags</span> = <span class="ruby-keyword kw">true</span>
+349: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000195" class="method-detail">
+ <a name="M000195"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000195" class="method-signature">
+
+ <span class="method-name">text_processor</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Accessor which returns the text processor used for untyped strings in <a
+href="Entry.html">Entry</a> fields. (defaults to <tt>RedCloth</tt>.)
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000195-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 416</span>
+416: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">text_processor</span>; <span class="ruby-constant">RedCloth</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000196" class="method-detail">
+ <a name="M000196"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000196" class="method-signature">
+
+ <span class="method-name">text_processor_fields</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Returns an Array of fields to which the text processor applies.
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000196-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 418</span>
+418: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">text_processor_fields</span>
+419: <span class="ruby-keyword kw">self</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>
+420: <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:text_processor</span>]
+421: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">compact</span>
+422: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000182" class="method-detail">
+ <a name="M000182"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000182" class="method-signature">
+
+ <span class="method-name">url_link</span><span class="method-args">( e, url = nil, ext = nil )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000182-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 318</span>
+318: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url_link</span>( <span class="ruby-identifier">e</span>, <span class="ruby-identifier">url</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">ext</span> = <span class="ruby-keyword kw">nil</span> ); <span class="ruby-node">&quot;#{ url }/#{ link_format e }#{ '.' + ext if ext }&quot;</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000191" class="method-detail">
+ <a name="M000191"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000191" class="method-signature">
+
+ <span class="method-name">yaml_type</span><span class="method-args">( tag )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000191-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 380</span>
+380: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">yaml_type</span>( <span class="ruby-identifier">tag</span> )
+381: <span class="ruby-comment cmt"># if self.respond_to? :yaml_as</span>
+382: <span class="ruby-comment cmt"># yaml_as tag</span>
+383: <span class="ruby-comment cmt"># else</span>
+384: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tag</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^tag:([^:]+):(.+)$/</span>
+385: <span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">:to_yaml_type</span> ) { <span class="ruby-value str">&quot;!#$1/#$2&quot;</span> }
+386: <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_domain_type</span>( <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">maker</span>( <span class="ruby-identifier">v</span> ) }
+387: <span class="ruby-keyword kw">end</span>
+388: <span class="ruby-comment cmt"># end</span>
+389: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+
+ <div id="method-M000181" class="method-detail">
+ <a name="M000181"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000181" class="method-signature">
+
+ <span class="method-name">base_id</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000181-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 317</span>
+317: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_id</span>; <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">id</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000189" class="method-detail">
+ <a name="M000189"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000189" class="method-signature">
+
+ <span class="method-name">canonical_tags</span><span class="method-args">( path=nil )</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+return canonical tags, i.e. tags that are forced and that are deduced from
+the entry path
+</p>
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000189-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 374</span>
+374: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canonical_tags</span>( <span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span> )
+375: ( <span class="ruby-identifier">force_tags</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">path_to_tags</span>( <span class="ruby-identifier">path</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span> ) ).<span class="ruby-identifier">uniq</span>
+376: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000177" class="method-detail">
+ <a name="M000177"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000177" class="method-signature">
+
+ <span class="method-name">day_id</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000177-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 313</span>
+313: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">day_id</span>; <span class="ruby-identifier">created</span>.<span class="ruby-identifier">strftime</span>( <span class="ruby-value str">&quot;%Y/%m/%d&quot;</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">created</span>; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000184" class="method-detail">
+ <a name="M000184"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000184" class="method-signature">
+
+ <span class="method-name">force_tags</span><span class="method-args">()</span>
+
+ </a>
+
+ </div>
+
+ <div class="method-description">
+
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000184-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000184-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/hobix/base.rb, line 320</span>
+320: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">force_tags</span>; []; <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+
+ </div>
+ </div>
+
+
+ <div id="method-M000178" class="method-detail">
+ <a name="M000178"></a>
+
+ <div class="method-heading">
+
+ <a href="#M000178" class="method-signature">
+