diff options
Diffstat (limited to 'vendor/plugins/gloc-1.1.0/doc/classes')
11 files changed, 0 insertions, 3112 deletions
diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html deleted file mode 100644 index fba33b5b5..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActionController/Filters/ClassMethods.html +++ /dev/null @@ -1,230 +0,0 @@ -<?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: ActionController::Filters::ClassMethods</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">ActionController::Filters::ClassMethods</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.rb
- </a>
- <br />
- </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="#M000001">autodetect_language_filter</a>
- </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-M000001" class="method-detail">
- <a name="M000001"></a>
-
- <div class="method-heading">
- <a href="#M000001" class="method-signature">
- <span class="method-name">autodetect_language_filter</span><span class="method-args">(*args)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-This filter attempts to auto-detect the clients desired language. It first
-checks the params, then a cookie and then the HTTP_ACCEPT_LANGUAGE request
-header. If a language is found to match or be similar to a currently valid
-language, then it sets the current_language of the controller.
-</p>
-<pre>
- class ExampleController < ApplicationController
- set_language :en
- autodetect_language_filter :except => 'monkey', :on_no_lang => :lang_not_autodetected_callback
- autodetect_language_filter :only => 'monkey', :check_cookie => 'monkey_lang', :check_accept_header => false
- ...
- def lang_not_autodetected_callback
- redirect_to somewhere
- end
- end
-</pre>
-<p>
-The <tt>args</tt> for this filter are exactly the same the arguments of
-<tt>before_filter</tt> with the following exceptions:
-</p>
-<ul>
-<li><tt>:check_params</tt> — If false, then params will not be checked
-for a language. If a String, then this will value will be used as the name
-of the param.
-
-</li>
-<li><tt>:check_cookie</tt> — If false, then the cookie will not be
-checked for a language. If a String, then this will value will be used as
-the name of the cookie.
-
-</li>
-<li><tt>:check_accept_header</tt> — If false, then HTTP_ACCEPT_LANGUAGE
-will not be checked for a language.
-
-</li>
-<li><tt>:on_set_lang</tt> — You can specify the name of a callback
-function to be called when the language is successfully detected and set.
-The param must be a Symbol or a String which is the name of the function.
-The callback function must accept one argument (the language) and must be
-instance level.
-
-</li>
-<li><tt>:on_no_lang</tt> — You can specify the name of a callback
-function to be called when the language couldn’t be detected
-automatically. The param must be a Symbol or a String which is the name of
-the function. The callback function must be instance level.
-
-</li>
-</ul>
-<p>
-You override the default names of the param or cookie by calling <tt><a
-href="../../GLoc.html#M000014">GLoc.set_config</a> :default_param_name
-=> ‘new_param_name‘</tt> and <tt><a
-href="../../GLoc.html#M000014">GLoc.set_config</a> :default_cookie_name
-=> ‘new_cookie_name‘</tt>.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000001-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 43</span>
-43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">autodetect_language_filter</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
-44: <span class="ruby-identifier">options</span>= <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">:</span> {}
-45: <span class="ruby-identifier">x</span>= <span class="ruby-value str">'Proc.new { |c| l= nil;'</span>
-46: <span class="ruby-comment cmt"># :check_params</span>
-47: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">v</span>= <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_params</span>)) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
-48: <span class="ruby-identifier">name</span>= <span class="ruby-identifier">v</span> <span class="ruby-value">? </span><span class="ruby-node">":#{v}"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'GLoc.get_config(:default_param_name)'</span>
-49: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"l ||= GLoc.similar_language(c.params[#{name}]);"</span>
-50: <span class="ruby-keyword kw">end</span>
-51: <span class="ruby-comment cmt"># :check_cookie</span>
-52: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">v</span>= <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_cookie</span>)) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
-53: <span class="ruby-identifier">name</span>= <span class="ruby-identifier">v</span> <span class="ruby-value">? </span><span class="ruby-node">":#{v}"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'GLoc.get_config(:default_cookie_name)'</span>
-54: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"l ||= GLoc.similar_language(c.send(:cookies)[#{name}]);"</span>
-55: <span class="ruby-keyword kw">end</span>
-56: <span class="ruby-comment cmt"># :check_accept_header</span>
-57: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:check_accept_header</span>) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
-58: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">%<
-59: unless l
-60: a= c.request.env['HTTP_ACCEPT_LANGUAGE'].split(/,|;/) rescue nil
-61: a.each {|x| l ||= GLoc.similar_language(x)} if a
-62: end; ></span>
-63: <span class="ruby-keyword kw">end</span>
-64: <span class="ruby-comment cmt"># Set language</span>
-65: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'ret= true;'</span>
-66: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'if l; c.set_language(l); c.headers[\'Content-Language\']= l.to_s; '</span>
-67: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:on_set_lang</span>)
-68: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"ret= c.#{options.delete(:on_set_lang)}(l);"</span>
-69: <span class="ruby-keyword kw">end</span>
-70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:on_no_lang</span>)
-71: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"else; ret= c.#{options.delete(:on_no_lang)};"</span>
-72: <span class="ruby-keyword kw">end</span>
-73: <span class="ruby-identifier">x</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'end; ret }'</span>
-74:
-75: <span class="ruby-comment cmt"># Create filter</span>
-76: <span class="ruby-identifier">block</span>= <span class="ruby-identifier">eval</span> <span class="ruby-identifier">x</span>
-77: <span class="ruby-identifier">before_filter</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
-78: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html deleted file mode 100644 index 056b23d85..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActionMailer/Base.html +++ /dev/null @@ -1,140 +0,0 @@ -<?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>Class: ActionMailer::Base</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>Class</strong></td>
- <td class="class-name-in-header">ActionMailer::Base</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.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 id="description">
- <p>
-In addition to including <a href="../GLoc.html">GLoc</a>,
-<tt>render_message</tt> is also overridden so that mail templates contain
-the current language at the end of the file. Eg. <tt>deliver_hello</tt>
-will render <tt>hello_en.rhtml</tt>.
-</p>
-
- </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="../GLoc.html">GLoc</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
- <div id="aliases-list">
- <h3 class="section-bar">External Aliases</h3>
-
- <div class="name-list">
- <table summary="aliases">
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">render_message</td>
- <td>-></td>
- <td class="context-item-value">render_message_without_gloc</td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
-
-
- <!-- 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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html deleted file mode 100644 index 00767055d..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html +++ /dev/null @@ -1,174 +0,0 @@ -<?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>Class: ActionView::Base</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>Class</strong></td>
- <td class="class-name-in-header">ActionView::Base</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.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 id="description">
- <p>
-<tt>initialize</tt> is overridden so that new instances of this class
-inherit the current language of the controller.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000046">new</a>
- </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="../GLoc.html">GLoc</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
- <div id="aliases-list">
- <h3 class="section-bar">External Aliases</h3>
-
- <div class="name-list">
- <table summary="aliases">
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">initialize</td>
- <td>-></td>
- <td class="context-item-value">initialize_without_gloc</td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Class methods</h3>
-
- <div id="method-M000046" class="method-detail">
- <a name="M000046"></a>
-
- <div class="method-heading">
- <a href="#M000046" class="method-signature">
- <span class="method-name">new</span><span class="method-args">(base_path = nil, assigns_for_first_render = {}, controller = nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000046-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 109</span>
-109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base_path</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">assigns_for_first_render</span> = {}, <span class="ruby-identifier">controller</span> = <span class="ruby-keyword kw">nil</span>)
-110: <span class="ruby-identifier">initialize_without_gloc</span>(<span class="ruby-identifier">base_path</span>, <span class="ruby-identifier">assigns_for_first_render</span>, <span class="ruby-identifier">controller</span>)
-111: <span class="ruby-identifier">set_language</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">current_language</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">nil?</span>
-112: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html deleted file mode 100644 index 84ca8fae3..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html +++ /dev/null @@ -1,348 +0,0 @@ -<?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: ActionView::Helpers::DateHelper</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">ActionView::Helpers::DateHelper</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../../files/lib/gloc-rails-text_rb.html">
- lib/gloc-rails-text.rb
- </a>
- <br />
- </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="#M000041">distance_of_time_in_words</a>
- <a href="#M000042">select_day</a>
- <a href="#M000043">select_month</a>
- <a href="#M000044">select_year</a>
- </div>
- </div>
-
- </div>
-
-
- <!-- if includes -->
-
- <div id="section">
-
-
- <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">LOCALIZED_HELPERS</td>
- <td>=</td>
- <td class="context-item-value">true</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">LOCALIZED_MONTHNAMES</td>
- <td>=</td>
- <td class="context-item-value">{}</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">LOCALIZED_ABBR_MONTHNAMES</td>
- <td>=</td>
- <td class="context-item-value">{}</td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000041" class="method-detail">
- <a name="M000041"></a>
-
- <div class="method-heading">
- <a href="#M000041" class="method-signature">
- <span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-This method uses <tt>current_language</tt> to return a localized string.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000041-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 16</span>
-16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
-17: <span class="ruby-identifier">from_time</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
-18: <span class="ruby-identifier">to_time</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
-19: <span class="ruby-identifier">distance_in_minutes</span> = (((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>)<span class="ruby-operator">/</span><span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>
-20: <span class="ruby-identifier">distance_in_seconds</span> = ((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>).<span class="ruby-identifier">round</span>
-21:
-22: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_minutes</span>
-23: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>
-24: <span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">distance_in_minutes</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_single</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">include_seconds</span>
-25: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_seconds</span>
-26: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">5</span>)
-27: <span class="ruby-keyword kw">when</span> <span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">10</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">10</span>)
-28: <span class="ruby-keyword kw">when</span> <span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">20</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">20</span>)
-29: <span class="ruby-keyword kw">when</span> <span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">40</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_half</span>)
-30: <span class="ruby-keyword kw">when</span> <span class="ruby-value">41</span><span class="ruby-operator">..</span><span class="ruby-value">59</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>)
-31: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>)
-32: <span class="ruby-keyword kw">end</span>
-33:
-34: <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">45</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>, <span class="ruby-identifier">distance_in_minutes</span>)
-35: <span class="ruby-keyword kw">when</span> <span class="ruby-value">46</span><span class="ruby-operator">..</span><span class="ruby-value">90</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about_single</span>)
-36: <span class="ruby-keyword kw">when</span> <span class="ruby-value">90</span><span class="ruby-operator">..</span><span class="ruby-value">1440</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about</span>, (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">60.0</span>).<span class="ruby-identifier">round</span>)
-37: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1441</span><span class="ruby-operator">..</span><span class="ruby-value">2880</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, <span class="ruby-value">1</span>)
-38: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, (<span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">/</span> <span class="ruby-value">1440</span>).<span class="ruby-identifier">round</span>)
-39: <span class="ruby-keyword kw">end</span>
-40: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000042" class="method-detail">
- <a name="M000042"></a>
-
- <div class="method-heading">
- <a href="#M000042" class="method-signature">
- <span class="method-name">select_day</span><span class="method-args">(date, options = {})</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-This method has been modified so that a localized string can be appended to
-the day numbers.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000042-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 43</span>
-43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
-44: <span class="ruby-identifier">day_options</span> = []
-45: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_day_prefix</span>
-46:
-47: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-value">31</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span><span class="ruby-operator">|</span>
-48: <span class="ruby-identifier">day_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">day</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">day</span>) <span class="ruby-operator">?</span>
-49: <span class="ruby-node">%(<option value="#{day}" selected="selected">#{day}#{prefix}</option>\n)</span> <span class="ruby-operator">:</span>
-50: <span class="ruby-node">%(<option value="#{day}">#{day}#{prefix}</option>\n)</span>
-51: )
-52: <span class="ruby-keyword kw">end</span>
-53:
-54: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'day'</span>, <span class="ruby-identifier">day_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
-55: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000043" class="method-detail">
- <a name="M000043"></a>
-
- <div class="method-heading">
- <a href="#M000043" class="method-signature">
- <span class="method-name">select_month</span><span class="method-args">(date, options = {})</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-This method has been modified so that
-</p>
-<ul>
-<li>the month names are localized.
-
-</li>
-<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>,
-<tt>:start_month</tt>, <tt>:end_month</tt>
-
-</li>
-<li>a localized string can be appended to the month numbers when the
-<tt>:use_month_numbers</tt> option is specified.
-
-</li>
-</ul>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000043-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 61</span>
-61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_month</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
-62: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">current_language</span>)
-63: <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
-64: <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names_abbr</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
-65: <span class="ruby-keyword kw">end</span>
-66:
-67: <span class="ruby-identifier">month_options</span> = []
-68: <span class="ruby-identifier">month_names</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_short_month</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] <span class="ruby-operator">:</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>]
-69:
-70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>)
-71: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span>
-72: <span class="ruby-identifier">start_month</span>, <span class="ruby-identifier">end_month</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">month</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">month</span>
-73: <span class="ruby-keyword kw">end</span>
-74: <span class="ruby-keyword kw">end</span>
-75: <span class="ruby-identifier">start_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">start_month</span>
-76: <span class="ruby-identifier">end_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">12</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">end_month</span>
-77: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_month_prefix</span>
-78:
-79: <span class="ruby-identifier">start_month</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">end_month</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">month_number</span><span class="ruby-operator">|</span>
-80: <span class="ruby-identifier">month_name</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_month_numbers</span>]
-81: <span class="ruby-node">"#{month_number}#{prefix}"</span>
-82: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:add_month_numbers</span>]
-83: <span class="ruby-identifier">month_number</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">' - '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
-84: <span class="ruby-keyword kw">else</span>
-85: <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
-86: <span class="ruby-keyword kw">end</span>
-87:
-88: <span class="ruby-identifier">month_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">month</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">month_number</span>) <span class="ruby-operator">?</span>
-89: <span class="ruby-node">%(<option value="#{month_number}" selected="selected">#{month_name}</option>\n)</span> <span class="ruby-operator">:</span>
-90: <span class="ruby-node">%(<option value="#{month_number}">#{month_name}</option>\n)</span>
-91: )
-92: <span class="ruby-keyword kw">end</span>
-93:
-94: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'month'</span>, <span class="ruby-identifier">month_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
-95: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000044" class="method-detail">
- <a name="M000044"></a>
-
- <div class="method-heading">
- <a href="#M000044" class="method-signature">
- <span class="method-name">select_year</span><span class="method-args">(date, options = {})</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-This method has been modified so that
-</p>
-<ul>
-<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>
-
-</li>
-<li>a localized string can be appended to the years numbers.
-
-</li>
-</ul>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000044-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 100</span>
-100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_year</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
-101: <span class="ruby-identifier">year_options</span> = []
-102: <span class="ruby-identifier">y</span> = <span class="ruby-identifier">date</span> <span class="ruby-value">? </span>(<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> (<span class="ruby-identifier">y</span> = (<span class="ruby-identifier">date</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span>
-103:
-104: <span class="ruby-identifier">start_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">5</span>)
-105: <span class="ruby-identifier">end_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>)
-106: <span class="ruby-identifier">step_val</span> = <span class="ruby-identifier">start_year</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">end_year</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>
-107: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_year_prefix</span>
-108:
-109: <span class="ruby-identifier">start_year</span>.<span class="ruby-identifier">step</span>(<span class="ruby-identifier">end_year</span>, <span class="ruby-identifier">step_val</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">year</span><span class="ruby-operator">|</span>
-110: <span class="ruby-identifier">year_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">year</span>) <span class="ruby-operator">?</span>
-111: <span class="ruby-node">%(<option value="#{year}" selected="selected">#{year}#{prefix}</option>\n)</span> <span class="ruby-operator">:</span>
-112: <span class="ruby-node">%(<option value="#{year}">#{year}#{prefix}</option>\n)</span>
-113: )
-114: <span class="ruby-keyword kw">end</span>
-115:
-116: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'year'</span>, <span class="ruby-identifier">year_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
-117: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html deleted file mode 100644 index a236e0e5d..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html +++ /dev/null @@ -1,167 +0,0 @@ -<?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>Class: ActionView::Helpers::InstanceTag</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>Class</strong></td>
- <td class="class-name-in-header">ActionView::Helpers::InstanceTag</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../../files/lib/gloc-rails-text_rb.html">
- lib/gloc-rails-text.rb
- </a>
- <br />
- <a href="../../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.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 id="description">
- <p>
-The private method <tt>add_options</tt> is overridden so that "Please
-select" is localized.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000045">current_language</a>
- </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="../../GLoc.html">GLoc</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000045" class="method-detail">
- <a name="M000045"></a>
-
- <div class="method-heading">
- <a href="#M000045" class="method-signature">
- <span class="method-name">current_language</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Inherits the current language from the template object.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000045-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 119</span>
-119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
-120: <span class="ruby-ivar">@template_object</span>.<span class="ruby-identifier">current_language</span>
-121: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html deleted file mode 100644 index 9a16f608b..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Errors.html +++ /dev/null @@ -1,215 +0,0 @@ -<?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>Class: ActiveRecord::Errors</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>Class</strong></td>
- <td class="class-name-in-header">ActiveRecord::Errors</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.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="#M000039">add</a>
- <a href="#M000040">current_language</a>
- </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="../GLoc.html">GLoc</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
- <div id="aliases-list">
- <h3 class="section-bar">External Aliases</h3>
-
- <div class="name-list">
- <table summary="aliases">
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">add</td>
- <td>-></td>
- <td class="context-item-value">add_without_gloc</td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000039" class="method-detail">
- <a name="M000039"></a>
-
- <div class="method-heading">
- <a href="#M000039" class="method-signature">
- <span class="method-name">add</span><span class="method-args">(attribute, msg= @@default_error_messages[:invalid])</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-The <a href="../GLoc.html">GLoc</a> version of this method provides two
-extra features
-</p>
-<ul>
-<li>If <tt>msg</tt> is a string, it will be considered a <a
-href="../GLoc.html">GLoc</a> string key.
-
-</li>
-<li>If <tt>msg</tt> is an array, the first element will be considered the
-string and the remaining elements will be considered arguments for the
-string. Eg. <tt>[‘Hi %s.’,’John’]</tt>
-
-</li>
-</ul>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000039-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 141</span>
-141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">msg</span>= <span class="ruby-ivar">@@default_error_messages</span>[<span class="ruby-identifier">:invalid</span>])
-142: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
-143: <span class="ruby-identifier">args</span>= <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">clone</span>
-144: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
-145: <span class="ruby-identifier">args</span>= <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
-146: <span class="ruby-keyword kw">end</span>
-147: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">ltry</span>(<span class="ruby-identifier">msg</span>)
-148: <span class="ruby-identifier">msg</span>= <span class="ruby-identifier">msg</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">args</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">nil?</span>
-149: <span class="ruby-identifier">add_without_gloc</span>(<span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">msg</span>)
-150: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000040" class="method-detail">
- <a name="M000040"></a>
-
- <div class="method-heading">
- <a href="#M000040" class="method-signature">
- <span class="method-name">current_language</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Inherits the current language from the base record.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000040-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 152</span>
-152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
-153: <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">current_language</span>
-154: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html deleted file mode 100644 index 145a74c2b..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/ActiveRecord/Validations/ClassMethods.html +++ /dev/null @@ -1,217 +0,0 @@ -<?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: ActiveRecord::Validations::ClassMethods</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">ActiveRecord::Validations::ClassMethods</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../../files/lib/gloc-rails_rb.html">
- lib/gloc-rails.rb
- </a>
- <br />
- </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="#M000037">validates_length_of</a>
- <a href="#M000038">validates_size_of</a>
- </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-M000037" class="method-detail">
- <a name="M000037"></a>
-
- <div class="method-heading">
- <a href="#M000037" class="method-signature">
- <span class="method-name">validates_length_of</span><span class="method-args">(*attrs)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-The default Rails version of this function creates an error message and
-then passes it to <a href="../Errors.html">ActiveRecord.Errors</a>. The <a
-href="../../GLoc.html">GLoc</a> version of this method, sends an array to
-<a href="../Errors.html">ActiveRecord.Errors</a> that will be turned into a
-string by <a href="../Errors.html">ActiveRecord.Errors</a> which in turn
-allows for the message of this validation function to be a <a
-href="../../GLoc.html">GLoc</a> string key.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000037-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 164</span>
-164: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validates_length_of</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
-165: <span class="ruby-comment cmt"># Merge given options with defaults.</span>
-166: <span class="ruby-identifier">options</span> = {
-167: <span class="ruby-identifier">:too_long</span> =<span class="ruby-operator">></span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:too_long</span>],
-168: <span class="ruby-identifier">:too_short</span> =<span class="ruby-operator">></span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:too_short</span>],
-169: <span class="ruby-identifier">:wrong_length</span> =<span class="ruby-operator">></span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>[<span class="ruby-identifier">:wrong_length</span>]
-170: }.<span class="ruby-identifier">merge</span>(<span class="ruby-constant">DEFAULT_VALIDATION_OPTIONS</span>)
-171: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">pop</span>.<span class="ruby-identifier">symbolize_keys</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
-172:
-173: <span class="ruby-comment cmt"># Ensure that one and only one range option is specified.</span>
-174: <span class="ruby-identifier">range_options</span> = <span class="ruby-constant">ALL_RANGE_OPTIONS</span> <span class="ruby-operator">&</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">keys</span>
-175: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">size</span>
-176: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
-177: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'</span>
-178: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
-179: <span class="ruby-comment cmt"># Valid number of options; do nothing.</span>
-180: <span class="ruby-keyword kw">else</span>
-181: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Too many range options specified. Choose only one.'</span>
-182: <span class="ruby-keyword kw">end</span>
-183:
-184: <span class="ruby-comment cmt"># Get range option and value.</span>
-185: <span class="ruby-identifier">option</span> = <span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">first</span>
-186: <span class="ruby-identifier">option_value</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">range_options</span>.<span class="ruby-identifier">first</span>]
-187:
-188: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">option</span>
-189: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:within</span>, <span class="ruby-identifier">:in</span>
-190: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">":#{option} must be a Range"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Range</span>)
-191:
-192: <span class="ruby-identifier">too_short</span> = [<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:too_short</span>] , <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">begin</span>]
-193: <span class="ruby-identifier">too_long</span> = [<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:too_long</span>] , <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">end</span> ]
-194:
-195: <span class="ruby-identifier">validates_each</span>(<span class="ruby-identifier">attrs</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record</span>, <span class="ruby-identifier">attr</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
-196: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">begin</span>
-197: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">too_short</span>)
-198: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">end</span>
-199: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">too_long</span>)
-200: <span class="ruby-keyword kw">end</span>
-201: <span class="ruby-keyword kw">end</span>
-202: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:is</span>, <span class="ruby-identifier">:minimum</span>, <span class="ruby-identifier">:maximum</span>
-203: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">":#{option} must be a nonnegative Integer"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">option_value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">option_value</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
-204:
-205: <span class="ruby-comment cmt"># Declare different validations per option.</span>
-206: <span class="ruby-identifier">validity_checks</span> = { <span class="ruby-identifier">:is</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"=="</span>, <span class="ruby-identifier">:minimum</span> =<span class="ruby-operator">></span> <span class="ruby-value str">">="</span>, <span class="ruby-identifier">:maximum</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"<="</span> }
-207: <span class="ruby-identifier">message_options</span> = { <span class="ruby-identifier">:is</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:wrong_length</span>, <span class="ruby-identifier">:minimum</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:too_short</span>, <span class="ruby-identifier">:maximum</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:too_long</span> }
-208:
-209: <span class="ruby-identifier">message</span> = [(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:message</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">message_options</span>[<span class="ruby-identifier">option</span>]]) , <span class="ruby-identifier">option_value</span>]
-210:
-211: <span class="ruby-identifier">validates_each</span>(<span class="ruby-identifier">attrs</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record</span>, <span class="ruby-identifier">attr</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
-212: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>)
-213: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">message</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">//</span>).<span class="ruby-identifier">size</span>.<span class="ruby-identifier">method</span>(<span class="ruby-identifier">validity_checks</span>[<span class="ruby-identifier">option</span>])[<span class="ruby-identifier">option_value</span>]
-214: <span class="ruby-keyword kw">else</span>
-215: <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">message</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">method</span>(<span class="ruby-identifier">validity_checks</span>[<span class="ruby-identifier">option</span>])[<span class="ruby-identifier">option_value</span>]
-216: <span class="ruby-keyword kw">end</span>
-217: <span class="ruby-keyword kw">end</span>
-218: <span class="ruby-keyword kw">end</span>
-219: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000038" class="method-detail">
- <a name="M000038"></a>
-
- <div class="method-heading">
- <span class="method-name">validates_size_of</span><span class="method-args">(*attrs)</span>
- </div>
-
- <div class="method-description">
- <p>
-Alias for <a href="ClassMethods.html#M000037">validates_length_of</a>
-</p>
- </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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html b/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html deleted file mode 100644 index 8a25c7de8..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc.html +++ /dev/null @@ -1,774 +0,0 @@ -<?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</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</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 />
- <a href="../files/lib/gloc-internal_rb.html">
- lib/gloc-internal.rb
- </a>
- <br />
- <a href="../files/lib/gloc-version_rb.html">
- lib/gloc-version.rb
- </a>
- <br />
- <a href="../files/lib/gloc_rb.html">
- lib/gloc.rb
- </a>
- <br />
- </td>
- </tr>
-
- </table>
- </div>
- <!-- banner header -->
-
- <div id="bodyContent">
-
-
-
- <div id="contextContent">
-
- <div id="description">
- <p>
-Copyright © 2005-2006 David Barri
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000004">add_localized_strings</a>
- <a href="#M000005">backup_state</a>
- <a href="#M000006">clear_strings</a>
- <a href="#M000007">clear_strings_except</a>
- <a href="#M000002">current_language</a>
- <a href="#M000003">current_language</a>
- <a href="#M000008">get_charset</a>
- <a href="#M000009">get_config</a>
- <a href="#M000010">load_gloc_default_localized_strings</a>
- <a href="#M000011">load_localized_strings</a>
- <a href="#M000012">restore_state</a>
- <a href="#M000013">set_charset</a>
- <a href="#M000014">set_config</a>
- <a href="#M000015">set_kcode</a>
- <a href="#M000016">similar_language</a>
- <a href="#M000018">valid_language?</a>
- <a href="#M000017">valid_languages</a>
- </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="GLoc/InstanceMethods.html">::GLoc::InstanceMethods</a></span>
- <span class="include-name"><a href="GLoc/InstanceMethods.html">::GLoc::InstanceMethods</a></span>
- </div>
- </div>
-
- <div id="section">
-
- <div id="class-list">
- <h3 class="section-bar">Classes and Modules</h3>
-
- Module <a href="GLoc/ClassMethods.html" class="link">GLoc::ClassMethods</a><br />
-Module <a href="GLoc/Helpers.html" class="link">GLoc::Helpers</a><br />
-Module <a href="GLoc/InstanceMethods.html" class="link">GLoc::InstanceMethods</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">LOCALIZED_STRINGS</td>
- <td>=</td>
- <td class="context-item-value">{}</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">RULES</td>
- <td>=</td>
- <td class="context-item-value">{}</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">LOWERCASE_LANGUAGES</td>
- <td>=</td>
- <td class="context-item-value">{}</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">UTF_8</td>
- <td>=</td>
- <td class="context-item-value">'utf-8'</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">SHIFT_JIS</td>
- <td>=</td>
- <td class="context-item-value">'sjis'</td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">EUC_JP</td>
- <td>=</td>
- <td class="context-item-value">'euc-jp'</td>
- </tr>
- </table>
- </div>
- </div>
-
- <div id="aliases-list">
- <h3 class="section-bar">External Aliases</h3>
-
- <div class="name-list">
- <table summary="aliases">
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">clear_strings</td>
- <td>-></td>
- <td class="context-item-value">_clear_strings</td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Class methods</h3>
-
- <div id="method-M000004" class="method-detail">
- <a name="M000004"></a>
-
- <div class="method-heading">
- <a href="#M000004" class="method-signature">
- <span class="method-name">add_localized_strings</span><span class="method-args">(lang, symbol_hash, override=true, strings_charset=nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Adds a collection of localized strings to the in-memory string store.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000004-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 113</span>
-113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">strings_charset</span>=<span class="ruby-keyword kw">nil</span>)
-114: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Adding #{symbol_hash.size} #{lang} strings."</span>}
-115: <span class="ruby-identifier">_add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>, <span class="ruby-identifier">strings_charset</span>)
-116: <span class="ruby-identifier">_verbose_msg</span> <span class="ruby-identifier">:stats</span>
-117: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000005" class="method-detail">
- <a name="M000005"></a>
-
- <div class="method-heading">
- <a href="#M000005" class="method-signature">
- <span class="method-name">backup_state</span><span class="method-args">(clear=false)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Creates a backup of the internal state of <a href="GLoc.html">GLoc</a> (ie.
-strings, langs, rules, config) and optionally clears everything.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000005-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 121</span>
-121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backup_state</span>(<span class="ruby-identifier">clear</span>=<span class="ruby-keyword kw">false</span>)
-122: <span class="ruby-identifier">s</span>= <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clone</span>}
-123: <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clear</span>} <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">clear</span>
-124: <span class="ruby-identifier">s</span>
-125: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000006" class="method-detail">
- <a name="M000006"></a>
-
- <div class="method-heading">
- <a href="#M000006" class="method-signature">
- <span class="method-name">clear_strings</span><span class="method-args">(*languages)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Removes all localized strings from memory, either of a certain language (or
-languages), or entirely.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000006-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 129</span>
-129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_strings</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">languages</span>)
-130: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">languages</span>.<span class="ruby-identifier">empty?</span>
-131: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-value str">"Clearing all strings"</span>}
-132: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">clear</span>
-133: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">clear</span>
-134: <span class="ruby-keyword kw">else</span>
-135: <span class="ruby-identifier">languages</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
-136: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Clearing :#{l} strings"</span>}
-137: <span class="ruby-identifier">l</span>= <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to_sym</span>
-138: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">l</span>
-139: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">each_pair</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-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">k</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">l</span>}
-140: }
-141: <span class="ruby-keyword kw">end</span>
-142: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000007" class="method-detail">
- <a name="M000007"></a>
-
- <div class="method-heading">
- <a href="#M000007" class="method-signature">
- <span class="method-name">clear_strings_except</span><span class="method-args">(*languages)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Removes all localized strings from memory, except for those of certain
-specified languages.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000007-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 146</span>
-146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_strings_except</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">languages</span>)
-147: <span class="ruby-identifier">clear</span>= (<span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">languages</span>)
-148: <span class="ruby-identifier">_clear_strings</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">clear</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">clear</span>.<span class="ruby-identifier">empty?</span>
-149: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <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">current_language</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the default language
-</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/gloc.rb, line 108</span>
-108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
-109: <span class="ruby-constant">GLoc</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:default_language</span>]
-110: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000008" class="method-detail">
- <a name="M000008"></a>
-
- <div class="method-heading">
- <a href="#M000008" class="method-signature">
- <span class="method-name">get_charset</span><span class="method-args">(lang)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the charset used to store localized strings in memory.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000008-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 152</span>
-152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
-153: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>][<span class="ruby-identifier">lang</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset</span>]
-154: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000009" class="method-detail">
- <a name="M000009"></a>
-
- <div class="method-heading">
- <a href="#M000009" class="method-signature">
- <span class="method-name">get_config</span><span class="method-args">(key)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a <a href="GLoc.html">GLoc</a> configuration value.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000009-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 157</span>
-157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_config</span>(<span class="ruby-identifier">key</span>)
-158: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">key</span>]
-159: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000010" class="method-detail">
- <a name="M000010"></a>
-
- <div class="method-heading">
- <a href="#M000010" class="method-signature">
- <span class="method-name">load_gloc_default_localized_strings</span><span class="method-args">(override=false)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Loads the localized strings that are included in the <a
-href="GLoc.html">GLoc</a> library.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000010-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 162</span>
-162: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_gloc_default_localized_strings</span>(<span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">false</span>)
-163: <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">load_localized_strings</span> <span class="ruby-node">"#{File.dirname(__FILE__)}/../lang"</span>, <span class="ruby-identifier">override</span>
-164: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000011" class="method-detail">
- <a name="M000011"></a>
-
- <div class="method-heading">
- <a href="#M000011" class="method-signature">
- <span class="method-name">load_localized_strings</span><span class="method-args">(dir=nil, override=true)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Loads localized strings from all yml files in the specifed directory.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000011-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 167</span>
-167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_localized_strings</span>(<span class="ruby-identifier">dir</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">override</span>=<span class="ruby-keyword kw">true</span>)
-168: <span class="ruby-identifier">_charset_required</span>
-169: <span class="ruby-identifier">_get_lang_file_list</span>(<span class="ruby-identifier">dir</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
-170:
-171: <span class="ruby-comment cmt"># Load file</span>
-172: <span class="ruby-identifier">raw_hash</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
-173: <span class="ruby-identifier">raw_hash</span>={} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">raw_hash</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
-174: <span class="ruby-identifier">filename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/([^\/\\]+)\.ya?ml$/</span>
-175: <span class="ruby-identifier">lang</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_sym</span>
-176: <span class="ruby-identifier">file_charset</span> = <span class="ruby-identifier">raw_hash</span>[<span class="ruby-value str">'file_charset'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">UTF_8</span>
-177:
-178: <span class="ruby-comment cmt"># Convert string keys to symbols</span>
-179: <span class="ruby-identifier">dest_charset</span>= <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
-180: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Reading file #{filename} [charset: #{file_charset} --> #{dest_charset}]"</span>}
-181: <span class="ruby-identifier">symbol_hash</span> = {}
-182: <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dest_charset</span>, <span class="ruby-identifier">file_charset</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
-183: <span class="ruby-identifier">raw_hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
-184: <span class="ruby-identifier">symbol_hash</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-identifier">value</span>)
-185: }
-186: <span class="ruby-keyword kw">end</span>
-187:
-188: <span class="ruby-comment cmt"># Add strings to repos</span>
-189: <span class="ruby-identifier">_add_localized_strings</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol_hash</span>, <span class="ruby-identifier">override</span>)
-190: }
-191: <span class="ruby-identifier">_verbose_msg</span> <span class="ruby-identifier">:stats</span>
-192: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000012" class="method-detail">
- <a name="M000012"></a>
-
- <div class="method-heading">
- <a href="#M000012" class="method-signature">
- <span class="method-name">restore_state</span><span class="method-args">(state)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Restores a backup of <a href="GLoc.html">GLoc</a>’s internal state
-that was made with <a href="GLoc.html#M000005">backup_state</a>.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000012-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 195</span>
-195: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_state</span>(<span class="ruby-identifier">state</span>)
-196: <span class="ruby-identifier">_get_internal_state_vars</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
-197: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">clear</span>
-198: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:merge!</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">:merge!</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:concat</span>, <span class="ruby-identifier">state</span>.<span class="ruby-identifier">shift</span>
-199: <span class="ruby-keyword kw">end</span>
-200: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000013" class="method-detail">
- <a name="M000013"></a>
-
- <div class="method-heading">
- <a href="#M000013" class="method-signature">
- <span class="method-name">set_charset</span><span class="method-args">(new_charset, *langs)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Sets the charset used to internally store localized strings. You can set
-the charset to use for a specific language or languages, or if none are
-specified the charset for ALL localized strings will be set.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000013-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 205</span>
-205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_charset</span>(<span class="ruby-identifier">new_charset</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">langs</span>)
-206: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>] <span class="ruby-operator">||=</span> {}
-207:
-208: <span class="ruby-comment cmt"># Convert symbol shortcuts</span>
-209: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_charset</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
-210: <span class="ruby-identifier">new_charset</span>= <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">new_charset</span>
-211: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:utf8</span>, <span class="ruby-identifier">:utf_8</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">UTF_8</span>
-212: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:sjis</span>, <span class="ruby-identifier">:shift_jis</span>, <span class="ruby-identifier">:shiftjis</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">SHIFT_JIS</span>
-213: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:eucjp</span>, <span class="ruby-identifier">:euc_jp</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">EUC_JP</span>
-214: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">new_charset</span>.<span class="ruby-identifier">to_s</span>
-215: <span class="ruby-keyword kw">end</span>
-216: <span class="ruby-keyword kw">end</span>
-217:
-218: <span class="ruby-comment cmt"># Convert existing strings</span>
-219: (<span class="ruby-identifier">langs</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">langs</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lang</span><span class="ruby-operator">|</span>
-220: <span class="ruby-identifier">cur_charset</span>= <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">lang</span>)
-221: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cur_charset</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">new_charset</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">cur_charset</span>
-222: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Converting :#{lang} strings from #{cur_charset} to #{new_charset}"</span>}
-223: <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">new_charset</span>, <span class="ruby-identifier">cur_charset</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
-224: <span class="ruby-identifier">bundle</span>= <span class="ruby-constant">LOCALIZED_STRINGS</span>[<span class="ruby-identifier">lang</span>]
-225: <span class="ruby-identifier">bundle</span>.<span class="ruby-identifier">each_pair</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">bundle</span>[<span class="ruby-identifier">k</span>]= <span class="ruby-identifier">i</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-identifier">v</span>)}
-226: <span class="ruby-keyword kw">end</span>
-227: <span class="ruby-keyword kw">end</span>
-228: <span class="ruby-keyword kw">end</span>
-229:
-230: <span class="ruby-comment cmt"># Set new charset value</span>
-231: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">langs</span>.<span class="ruby-identifier">empty?</span>
-232: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Setting GLoc charset for all languages to #{new_charset}"</span>}
-233: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset</span>]= <span class="ruby-identifier">new_charset</span>
-234: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>].<span class="ruby-identifier">clear</span>
-235: <span class="ruby-keyword kw">else</span>
-236: <span class="ruby-identifier">langs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lang</span><span class="ruby-operator">|</span>
-237: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"Setting GLoc charset for :#{lang} strings to #{new_charset}"</span>}
-238: <span class="ruby-constant">CONFIG</span>[<span class="ruby-identifier">:internal_charset_per_lang</span>][<span class="ruby-identifier">lang</span>]= <span class="ruby-identifier">new_charset</span>
-239: <span class="ruby-keyword kw">end</span>
-240: <span class="ruby-keyword kw">end</span>
-241: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000014" class="method-detail">
- <a name="M000014"></a>
-
- <div class="method-heading">
- <a href="#M000014" class="method-signature">
- <span class="method-name">set_config</span><span class="method-args">(hash)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Sets <a href="GLoc.html">GLoc</a> configuration values.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000014-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 244</span>
-244: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_config</span>(<span class="ruby-identifier">hash</span>)
-245: <span class="ruby-constant">CONFIG</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">hash</span>
-246: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000015" class="method-detail">
- <a name="M000015"></a>
-
- <div class="method-heading">
- <a href="#M000015" class="method-signature">
- <span class="method-name">set_kcode</span><span class="method-args">(charset=nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Sets the $KCODE global variable according to a specified charset, or else
-the current default charset for the default language.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000015-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 250</span>
-250: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_kcode</span>(<span class="ruby-identifier">charset</span>=<span class="ruby-keyword kw">nil</span>)
-251: <span class="ruby-identifier">_charset_required</span>
-252: <span class="ruby-identifier">charset</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">current_language</span>)
-253: <span class="ruby-identifier">$KCODE</span>= <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">charset</span>
-254: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">UTF_8</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'u'</span>
-255: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">SHIFT_JIS</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'s'</span>
-256: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">EUC_JP</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">'e'</span>
-257: <span class="ruby-keyword kw">else</span> <span class="ruby-value str">'n'</span>
-258: <span class="ruby-keyword kw">end</span>
-259: <span class="ruby-identifier">_verbose_msg</span> {<span class="ruby-node">"$KCODE set to #{$KCODE}"</span>}
-260: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000016" class="method-detail">
- <a name="M000016"></a>
-
- <div class="method-heading">
- <a href="#M000016" class="method-signature">
- <span class="method-name">similar_language</span><span class="method-args">(lang)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Tries to find a valid language that is similar to the argument passed. Eg.
-:en, :en_au, :EN_US are all similar languages. Returns <tt>nil</tt> if no
-similar languages are found.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000016-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 265</span>
-265: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">similar_language</span>(<span class="ruby-identifier">lang</span>)
-266: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">nil?</span>
-267: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">lang</span>)
-268: <span class="ruby-comment cmt"># Check lowercase without dashes</span>
-269: <span class="ruby-identifier">lang</span>= <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'-'</span>,<span class="ruby-value str">'_'</span>)
-270: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">lang</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">lang</span>)
-271: <span class="ruby-comment cmt"># Check without dialect</span>
-272: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([a-z]+?)[^a-z].*/</span>
-273: <span class="ruby-identifier">lang</span>= <span class="ruby-identifier">$1</span>
-274: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">lang</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">lang</span>)
-275: <span class="ruby-keyword kw">end</span>
-276: <span class="ruby-comment cmt"># Check other dialects</span>
-277: <span class="ruby-identifier">lang</span>= <span class="ruby-node">"#{lang}_"</span>
-278: <span class="ruby-constant">LOWERCASE_LANGUAGES</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">return</span> <span class="ruby-constant">LOWERCASE_LANGUAGES</span>[<span class="ruby-identifier">k</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-identifier">lang</span>)}
-279: <span class="ruby-comment cmt"># Nothing found</span>
-280: <span class="ruby-keyword kw">nil</span>
-281: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000018" class="method-detail">
- <a name="M000018"></a>
-
- <div class="method-heading">
- <a href="#M000018" class="method-signature">
- <span class="method-name">valid_language?</span><span class="method-args">(language)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns <tt>true</tt> if there are any localized strings for a specified
-language. Note that although <tt>set_langauge nil</tt> is perfectly valid,
-<tt>nil</tt> is not a valid language.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000018-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 290</span>
-290: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">language</span>)
-291: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">language</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">false</span>
-292: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000017" class="method-detail">
- <a name="M000017"></a>
-
- <div class="method-heading">
- <a href="#M000017" class="method-signature">
- <span class="method-name">valid_languages</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns an array of (currently) valid languages (ie. languages for which
-localized data exists).
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000017-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 284</span>
-284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_languages</span>
-285: <span class="ruby-constant">LOCALIZED_STRINGS</span>.<span class="ruby-identifier">keys</span>
-286: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <h3 class="section-bar">Public Instance methods</h3>
-
- <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">current_language</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the instance-level current language, or if not set, returns the
-class-level current language.
-</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/gloc.rb, line 77</span>
-77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
-78: <span class="ruby-ivar">@gloc_language</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">current_language</span>
-79: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html b/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html deleted file mode 100644 index ba1a28ad0..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/ClassMethods.html +++ /dev/null @@ -1,160 +0,0 @@ -<?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::ClassMethods</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::ClassMethods</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/gloc_rb.html">
- lib/gloc.rb
- </a>
- <br />
- </td>
- </tr>
-
- </table>
- </div>
- <!-- banner header -->
-
- <div id="bodyContent">
-
-
-
- <div id="contextContent">
-
- <div id="description">
- <p>
-All classes/modules that include <a href="../GLoc.html">GLoc</a> will also
-gain these class methods. Notice that the <a
-href="InstanceMethods.html">GLoc::InstanceMethods</a> module is also
-included.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000019">current_language</a>
- </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="InstanceMethods.html">::GLoc::InstanceMethods</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000019" class="method-detail">
- <a name="M000019"></a>
-
- <div class="method-heading">
- <a href="#M000019" class="method-signature">
- <span class="method-name">current_language</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the current language, or if not set, returns the <a
-href="../GLoc.html">GLoc</a> current language.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000019-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 89</span>
-89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
-90: <span class="ruby-ivar">@gloc_language</span> <span class="ruby-operator">||</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">current_language</span>
-91: <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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html b/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html deleted file mode 100644 index f3fdf63e1..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/Helpers.html +++ /dev/null @@ -1,323 +0,0 @@ -<?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>
- <a href="#M000020">l_age</a>
- <a href="#M000021">l_date</a>
- <a href="#M000022">l_datetime</a>
- <a href="#M000023">l_datetime_short</a>
- <a href="#M000028">l_lang_name</a>
- <a href="#M000024">l_strftime</a>
- <a href="#M000025">l_time</a>
- <a href="#M000027">l_yesno</a>
- </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">"general_lang_#{lang}"</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>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html b/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html deleted file mode 100644 index 4e15c9383..000000000 --- a/vendor/plugins/gloc-1.1.0/doc/classes/GLoc/InstanceMethods.html +++ /dev/null @@ -1,364 +0,0 @@ -<?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::InstanceMethods</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::InstanceMethods</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/gloc_rb.html">
- lib/gloc.rb
- </a>
- <br />
- </td>
- </tr>
-
- </table>
- </div>
- <!-- banner header -->
-
- <div id="bodyContent">
-
-
-
- <div id="contextContent">
-
- <div id="description">
- <p>
-This module will be included in both instances and classes of <a
-href="../GLoc.html">GLoc</a> includees. It is also included as class
-methods in the <a href="../GLoc.html">GLoc</a> module itself.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000029">l</a>
- <a href="#M000034">l_has_string?</a>
- <a href="#M000030">ll</a>
- <a href="#M000031">ltry</a>
- <a href="#M000032">lwr</a>
- <a href="#M000033">lwr_</a>
- <a href="#M000035">set_language</a>
- <a href="#M000036">set_language_if_valid</a>
- </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="Helpers.html">Helpers</a></span>
- </div>
- </div>
-
- <div id="section">
-
-
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000029" class="method-detail">
- <a name="M000029"></a>
-
- <div class="method-heading">
- <a href="#M000029" class="method-signature">
- <span class="method-name">l</span><span class="method-args">(symbol, *arguments)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a localized string.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000029-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 18</span>
-18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-19: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">current_language</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-20: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000034" class="method-detail">
- <a name="M000034"></a>
-
- <div class="method-heading">
- <a href="#M000034" class="method-signature">
- <span class="method-name">l_has_string?</span><span class="method-args">(symbol)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns <tt>true</tt> if a localized string with the specified key exists.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000034-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 48</span>
-48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">l_has_string?</span>(<span class="ruby-identifier">symbol</span>)
-49: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l_has_string?</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">current_language</span>)
-50: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000030" class="method-detail">
- <a name="M000030"></a>
-
- <div class="method-heading">
- <a href="#M000030" class="method-signature">
- <span class="method-name">ll</span><span class="method-args">(lang, symbol, *arguments)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a localized string in a specified language. This does not effect
-<tt>current_language</tt>.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000030-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 24</span>
-24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ll</span>(<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-25: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-identifier">symbol</span>,<span class="ruby-identifier">lang</span>.<span class="ruby-identifier">to_sym</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-26: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000031" class="method-detail">
- <a name="M000031"></a>
-
- <div class="method-heading">
- <a href="#M000031" class="method-signature">
- <span class="method-name">ltry</span><span class="method-args">(possible_key)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a localized string if the argument is a Symbol, else just returns
-the argument.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000031-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 29</span>
-29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ltry</span>(<span class="ruby-identifier">possible_key</span>)
-30: <span class="ruby-identifier">possible_key</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">possible_key</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">possible_key</span>
-31: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000032" class="method-detail">
- <a name="M000032"></a>
-
- <div class="method-heading">
- <a href="#M000032" class="method-signature">
- <span class="method-name">lwr</span><span class="method-args">(symbol, *arguments)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Uses the default <a href="../GLoc.html">GLoc</a> rule to return a localized
-string. See lwr_() for more info.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000032-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 35</span>
-35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-36: <span class="ruby-identifier">lwr_</span>(<span class="ruby-identifier">:default</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-37: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000033" class="method-detail">
- <a name="M000033"></a>
-
- <div class="method-heading">
- <a href="#M000033" class="method-signature">
- <span class="method-name">lwr_</span><span class="method-args">(rule, symbol, *arguments)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Uses a <em>rule</em> to return a localized string. A rule is a function
-that uses specified arguments to return a localization key prefix. The
-prefix is appended to the localization key originally specified, to create
-a new key which is then used to lookup a localized string.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000033-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 43</span>
-43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lwr_</span>(<span class="ruby-identifier">rule</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-44: <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">_l</span>(<span class="ruby-node">"#{symbol}#{GLoc::_l_rule(rule,current_language).call(*arguments)}"</span>,<span class="ruby-identifier">current_language</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
-45: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000035" class="method-detail">
- <a name="M000035"></a>
-
- <div class="method-heading">
- <a href="#M000035" class="method-signature">
- <span class="method-name">set_language</span><span class="method-args">(language)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Sets the current language for this instance/class. Setting the language of
-a class effects all instances unless the instance has its own language
-defined.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000035-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 54</span>
-54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_language</span>(<span class="ruby-identifier">language</span>)
-55: <span class="ruby-ivar">@gloc_language</span>= <span class="ruby-identifier">language</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">language</span>.<span class="ruby-identifier">to_sym</span>
-56: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000036" class="method-detail">
- <a name="M000036"></a>
-
- <div class="method-heading">
- <a href="#M000036" class="method-signature">
- <span class="method-name">set_language_if_valid</span><span class="method-args">(language)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Sets the current language if the language passed is a valid language. If
-the language was valid, this method returns <tt>true</tt> else it will
-return <tt>false</tt>. Note that <tt>nil</tt> is not a valid language. See
-<a href="InstanceMethods.html#M000035">set_language</a>(language) for more
-info.
-</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000036-source">
-<pre>
- <span class="ruby-comment cmt"># File lib/gloc.rb, line 62</span>
-62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_language_if_valid</span>(<span class="ruby-identifier">language</span>)
-63: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GLoc</span>.<span class="ruby-identifier">valid_language?</span>(<span class="ruby-identifier">language</span>)
-64: <span class="ruby-identifier">set_language</span>(<span class="ruby-identifier">language</span>)
-65: <span class="ruby-keyword kw">true</span>
-66: <span class="ruby-keyword kw">else</span>
-67: <span class="ruby-keyword kw">false</span>
-68: <span class="ruby-keyword kw">end</span>
-69: <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>
\ No newline at end of file |