html/WWWJDic/Parsers/Key.html in wwwjdic-14.0.0 vs html/WWWJDic/Parsers/Key.html in wwwjdic-15.0.0

- old
+ new

@@ -2,33 +2,33 @@ <html> <head> <meta charset="UTF-8"> -<title>class WWWJDic::Parsers::Key - wwwjdic 14.0.0</title> +<title>class WWWJDic::Parsers::Key - wwwjdic 15.0.0</title> <script type="text/javascript"> var rdoc_rel_prefix = "../../"; var index_rel_prefix = "../../"; </script> -<script src="../../js/navigation.js" defer></script> -<script src="../../js/search.js" defer></script> -<script src="../../js/search_index.js" defer></script> -<script src="../../js/searcher.js" defer></script> -<script src="../../js/darkfish.js" defer></script> +<script defer src="../../js/navigation.js"></script> +<script defer src="../../js/search.js"></script> +<script defer src="../../js/search_index.js"></script> +<script defer src="../../js/searcher.js"></script> +<script defer src="../../js/darkfish.js"></script> <link href="../../css/fonts.css" rel="stylesheet"> <link href="../../css/rdoc.css" rel="stylesheet"> -<body id="top" role="document" class="class"> +<body class="class" id="top" role="document"> <nav role="navigation"> <div id="project-navigation"> - <div id="home-section" role="region" title="Quick navigation" class="nav-section"> + <div class="nav-section" id="home-section" role="region" title="Quick navigation"> <h2> <a href="../../index.html" rel="home">Home</a> </h2> <div id="table-of-contents-navigation"> @@ -36,73 +36,73 @@ <a href="../../table_of_contents.html#classes">Classes</a> <a href="../../table_of_contents.html#methods">Methods</a> </div> </div> - <div id="search-section" role="search" class="project-section initially-hidden"> - <form action="#" method="get" accept-charset="utf-8"> + <div class="project-section initially-hidden" id="search-section" role="search"> + <form accept-charset="utf-8" action="#" method="get"> <div id="search-field-wrapper"> - <input id="search-field" role="combobox" aria-label="Search" - aria-autocomplete="list" aria-controls="search-results" - type="text" name="search" placeholder="Search" spellcheck="false" - title="Type to search, Up and Down to navigate, Enter to load"> + <input aria-autocomplete="list" aria-controls="search-results" aria-label="Search" + id="search-field" name="search" + placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load" + type="text"> </div> - <ul id="search-results" aria-label="Search Results" - aria-busy="false" aria-expanded="false" - aria-atomic="false" class="initially-hidden"></ul> + <ul aria-atomic="false" aria-busy="false" + aria-expanded="false" aria-label="Search Results" + class="initially-hidden" id="search-results"></ul> </form> </div> </div> - + <div id="class-metadata"> - - <div id="parent-class-section" class="nav-section"> + + <div class="nav-section" id="parent-class-section"> <h3>Parent</h3> - + <p class="link"><a href="../../Object.html">Object</a> - + </div> - <div id="includes-section" class="nav-section"> + <div class="nav-section" id="includes-section"> <h3>Included Modules</h3> <ul class="link-list"> - - + + <li><a class="include" href="../Utils/Raisers.html">WWWJDic::Utils::Raisers</a> - - + + </ul> </div> - + <!-- Method Quickref --> -<div id="method-list-section" class="nav-section"> +<div class="nav-section" id="method-list-section"> <h3>Methods</h3> <ul class="link-list" role="directory"> - + <li ><a href="#method-i-parse">#parse</a> - + </ul> </div> </div> </nav> -<main role="main" aria-labelledby="class-WWWJDic::Parsers::Key"> - <h1 id="class-WWWJDic::Parsers::Key" class="class"> +<main aria-labelledby="class-WWWJDic::Parsers::Key" role="main"> + <h1 class="class" id="class-WWWJDic::Parsers::Key"> class WWWJDic::Parsers::Key </h1> <section class="description"> - + <p>This class is an implementation of the Parsable duck type that checks the display type. The only needed parameter is the word to translate.</p> <p>k is the key type:</p> <ul><li> <p>for dictionary lookups</p> @@ -144,74 +144,74 @@ <dl class="rdoc-list note-list"><dt>Author <dd> <p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p> </dd><dt>Copyright <dd> -<p>Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p> +<p>(C) 2014 Marco Bresciani</p> </dd><dt>License <dd> <p>GNU General Public License version 3</p> </dd></dl> </section> - - <section id="5Buntitled-5D" class="documentation-section"> - - + <section class="documentation-section" id="5Buntitled-5D"> - - - - <section id="public-instance-5Buntitled-5D-method-details" class="method-section"> + + + + + + + <section class="method-section" id="public-instance-5Buntitled-5D-method-details"> <header> <h3>Public Instance Methods</h3> </header> - - <div id="method-i-parse" class="method-detail "> - + + <div class="method-detail " id="method-i-parse"> + <div class="method-heading"> <span class="method-name">parse</span><span - class="method-args">(value = :exact)</span> - + class="method-args">(value = :english)</span> + <span class="method-click-advice">click to toggle source</span> - + </div> - + <div class="method-description"> - + <p>The parsable duck type interface to every parser usage.</p> - - - + + + <div class="method-source-code" id="parse-source"> <pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/key.rb</span> -<span class="line-num">65</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">value</span> = <span class="ruby-value">:exact</span>) -<span class="line-num">66</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">&#39;error.nil&#39;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> -<span class="line-num">67</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">&#39;error.param&#39;</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span> -<span class="line-num">68</span> -<span class="line-num">69</span> <span class="ruby-identifier">raiser_array</span>(<span class="ruby-string">&#39;error.param&#39;</span>, <span class="ruby-identifier">value</span>, <span class="ruby-constant">KEYS</span>.<span class="ruby-identifier">keys</span>) -<span class="line-num">70</span> -<span class="line-num">71</span> <span class="ruby-identifier">value</span> -<span class="line-num">72</span> <span class="ruby-keyword">end</span></pre> +<span class="line-num">70</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">value</span> = <span class="ruby-value">:english</span>) +<span class="line-num">71</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">&#39;error.nil&#39;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> +<span class="line-num">72</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">&#39;error.param&#39;</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span> +<span class="line-num">73</span> +<span class="line-num">74</span> <span class="ruby-identifier">raiser_array</span>(<span class="ruby-string">&#39;error.param&#39;</span>, <span class="ruby-identifier">value</span>, <span class="ruby-constant">KEYS</span>.<span class="ruby-identifier">keys</span>) +<span class="line-num">75</span> +<span class="line-num">76</span> <span class="ruby-identifier">value</span> +<span class="line-num">77</span> <span class="ruby-keyword">end</span></pre> </div> - + </div> - - + + </div> - + </section> - + </section> </main>