obsolete.ChilliProject/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html

323 lines
13 KiB
HTML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: GLoc::Helpers</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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">GLoc::Helpers</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/gloc-helpers_rb.html">
lib/gloc-helpers.rb
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
These helper methods will be included in the <a
href="InstanceMethods.html">InstanceMethods</a> module.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000026">l_YesNo</a>&nbsp;&nbsp;
<a href="#M000020">l_age</a>&nbsp;&nbsp;
<a href="#M000021">l_date</a>&nbsp;&nbsp;
<a href="#M000022">l_datetime</a>&nbsp;&nbsp;
<a href="#M000023">l_datetime_short</a>&nbsp;&nbsp;
<a href="#M000028">l_lang_name</a>&nbsp;&nbsp;
<a href="#M000024">l_strftime</a>&nbsp;&nbsp;
<a href="#M000025">l_time</a>&nbsp;&nbsp;
<a href="#M000027">l_yesno</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000026" class="method-detail">
<a name="M000026"></a>
<div class="method-heading">
<a href="#M000026" class="method-signature">
<span class="method-name">l_YesNo</span><span class="method-args">(value)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000026-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 12</span>
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_YesNo</span>(<span class="ruby-identifier">value</span>) <span class="ruby-identifier">l</span>(<span class="ruby-identifier">value</span> <span class="ruby-value">? </span><span class="ruby-operator">:</span><span class="ruby-identifier">general_text_Yes</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:general_text_No</span>) <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000020" class="method-detail">
<a name="M000020"></a>
<div class="method-heading">
<a href="#M000020" class="method-signature">
<span class="method-name">l_age</span><span class="method-args">(age)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000020-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 6</span>
6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_age</span>(<span class="ruby-identifier">age</span>) <span class="ruby-identifier">lwr</span> <span class="ruby-operator">:</span><span class="ruby-identifier">general_fmt_age</span>, <span class="ruby-identifier">age</span> <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000021" class="method-detail">
<a name="M000021"></a>
<div class="method-heading">
<a href="#M000021" class="method-signature">
<span class="method-name">l_date</span><span class="method-args">(date)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000021-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 7</span>
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_date</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_date</span> <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000022" class="method-detail">
<a name="M000022"></a>
<div class="method-heading">
<a href="#M000022" class="method-signature">
<span class="method-name">l_datetime</span><span class="method-args">(date)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000022-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 8</span>
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_datetime</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_datetime</span> <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000023" class="method-detail">
<a name="M000023"></a>
<div class="method-heading">
<a href="#M000023" class="method-signature">
<span class="method-name">l_datetime_short</span><span class="method-args">(date)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000023-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 9</span>
9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_datetime_short</span>(<span class="ruby-identifier">date</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">date</span>, <span class="ruby-identifier">:general_fmt_datetime_short</span> <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000028" class="method-detail">
<a name="M000028"></a>
<div class="method-heading">
<a href="#M000028" class="method-signature">
<span class="method-name">l_lang_name</span><span class="method-args">(lang, display_lang=nil)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000028-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 15</span>
15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_lang_name</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">display_lang</span>=<span class="ruby-keyword kw">nil</span>)
16: <span class="ruby-identifier">ll</span> <span class="ruby-identifier">display_lang</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">current_language</span>, <span class="ruby-node">&quot;general_lang_#{lang}&quot;</span>
17: <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000024" class="method-detail">
<a name="M000024"></a>
<div class="method-heading">
<a href="#M000024" class="method-signature">
<span class="method-name">l_strftime</span><span class="method-args">(date,fmt)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000024-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 10</span>
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_strftime</span>(<span class="ruby-identifier">date</span>,<span class="ruby-identifier">fmt</span>) <span class="ruby-identifier">date</span>.<span class="ruby-identifier">strftime</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">fmt</span>) <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000025" class="method-detail">
<a name="M000025"></a>
<div class="method-heading">
<a href="#M000025" class="method-signature">
<span class="method-name">l_time</span><span class="method-args">(time)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000025-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 11</span>
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_time</span>(<span class="ruby-identifier">time</span>) <span class="ruby-identifier">l_strftime</span> <span class="ruby-identifier">time</span>, <span class="ruby-identifier">:general_fmt_time</span> <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
<div id="method-M000027" class="method-detail">
<a name="M000027"></a>
<div class="method-heading">
<a href="#M000027" class="method-signature">
<span class="method-name">l_yesno</span><span class="method-args">(value)</span>
</a>
</div>
<div class="method-description">
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000027-source">
<pre>
<span class="ruby-comment cmt"># File lib/gloc-helpers.rb, line 13</span>
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_yesno</span>(<span class="ruby-identifier">value</span>) <span class="ruby-identifier">l</span>(<span class="ruby-identifier">value</span> <span class="ruby-value">? </span><span class="ruby-operator">:</span><span class="ruby-identifier">general_text_yes</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:general_text_no</span>) <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>