Skip to content

Commit

Permalink
📖 Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
elifoster committed Jan 18, 2021
1 parent 1595ae8 commit aef037a
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/Slang.html
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ <h3 class="signature first" id="to_h-instance_method">
</div>

<div id="footer">
Generated on Mon Jan 18 11:24:48 2021 by
Generated on Mon Jan 18 11:51:53 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-3.0.0).
</div>
Expand Down
62 changes: 55 additions & 7 deletions docs/UrbanDictionary.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@

</div>

<h2>Defined Under Namespace</h2>
<p class="children">




<strong class="classes">Classes:</strong> <span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span>


</p>


<h2>
Expand Down Expand Up @@ -234,6 +244,19 @@ <h3 class="signature first" id="define-class_method">
<p>An array of #<span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span> objects.</p>
</div>

</li>

</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">

<li>


<span class='type'>(<tt><span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span></tt>)</span>



</li>

</ul>
Expand All @@ -244,7 +267,6 @@ <h3 class="signature first" id="define-class_method">
<pre class="lines">


13
14
15
16
Expand All @@ -255,17 +277,24 @@ <h3 class="signature first" id="define-class_method">
21
22
23
24</pre>
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/urbandict.rb', line 13</span>
<pre class="code"><span class="info file"># File 'lib/urbandict.rb', line 14</span>

<span class='kw'>def</span> <span class='id identifier rubyid_define'>define</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='label'>term:</span> <span class='id identifier rubyid_word'>word</span>
<span class='rbrace'>}</span>
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>HTTPClient</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#URL-constant" title="UrbanDictionary::URL (constant)">URL</a></span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>error</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>list</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_hash'>hash</span><span class='op'>|</span>
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>&lt;&lt;</span> <span class='const'><span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Slang.html#initialize-instance_method" title="Slang#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
Expand Down Expand Up @@ -337,6 +366,19 @@ <h3 class="signature first" id="define-instance_method">
<p>An array of #<span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span> objects.</p>
</div>

</li>

</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">

<li>


<span class='type'>(<tt><span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span></tt>)</span>



</li>

</ul>
Expand All @@ -347,7 +389,6 @@ <h3 class="signature first" id="define-instance_method">
<pre class="lines">


13
14
15
16
Expand All @@ -358,17 +399,24 @@ <h3 class="signature first" id="define-instance_method">
21
22
23
24</pre>
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/urbandict.rb', line 13</span>
<pre class="code"><span class="info file"># File 'lib/urbandict.rb', line 14</span>

<span class='kw'>def</span> <span class='id identifier rubyid_define'>define</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='label'>term:</span> <span class='id identifier rubyid_word'>word</span>
<span class='rbrace'>}</span>
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>HTTPClient</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#URL-constant" title="UrbanDictionary::URL (constant)">URL</a></span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>error</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>list</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_hash'>hash</span><span class='op'>|</span>
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>&lt;&lt;</span> <span class='const'><span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Slang.html#initialize-instance_method" title="Slang#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
Expand All @@ -385,7 +433,7 @@ <h3 class="signature first" id="define-instance_method">
</div>

<div id="footer">
Generated on Mon Jan 18 11:24:48 2021 by
Generated on Mon Jan 18 11:51:52 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-3.0.0).
</div>
Expand Down
206 changes: 206 additions & 0 deletions docs/UrbanDictionary/UrbanDictError.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: UrbanDictionary::UrbanDictError

&mdash; Documentation by YARD 0.9.26

</title>

<link rel="stylesheet" href="../css/style.css" type="text/css" />

<link rel="stylesheet" href="../css/common.css" type="text/css" />

<script type="text/javascript">
pathId = "UrbanDictionary::UrbanDictError";
relpath = '../';
</script>


<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>

<div id="main" tabindex="-1">
<div id="header">
<div id="menu">

<a href="../_index.html">Index (U)</a> &raquo;
<span class='title'><span class='object_link'><a href="../UrbanDictionary.html" title="UrbanDictionary (module)">UrbanDictionary</a></span></span>
&raquo;
<span class="title">UrbanDictError</span>

</div>

<div id="search">

<a class="full_list_link" id="class_list_link"
href="../class_list.html">

<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>

</div>
<div class="clear"></div>
</div>

<div id="content"><h1>Exception: UrbanDictionary::UrbanDictError



</h1>
<div class="box_info">

<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName">StandardError</span>

<ul class="fullTree">
<li>Object</li>

<li class="next">StandardError</li>

<li class="next">UrbanDictionary::UrbanDictError</li>

</ul>
<a href="#" class="inheritanceTree">show all</a>

</dd>
</dl>











<dl>
<dt>Defined in:</dt>
<dd>lib/urbandict.rb</dd>
</dl>

</div>

<h2>Overview</h2><div class="docstring">
<div class="discussion">

<p>Urban Dictionary does not provide any useful information, so we provide a note about alphanumeric characters which is the only error I have encountered to date (1/18/2021).</p>


</div>
</div>
<div class="tags">


</div>







<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>

<ul class="summary">

<li class="public ">
<span class="summary_signature">

<a href="#message-instance_method" title="#message (instance method)">#<strong>message</strong> &#x21d2; Object </a>



</span>









<span class="summary_desc"><div class='inline'></div></span>

</li>


</ul>





<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>


<div class="method_details first">
<h3 class="signature first" id="message-instance_method">

#<strong>message</strong> &#x21d2; <tt>Object</tt>





</h3><table class="source_code">
<tr>
<td>
<pre class="lines">


33
34
35
36</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/urbandict.rb', line 33</span>

<span class='kw'>def</span> <span class='id identifier rubyid_message'>message</span>
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>An error occurred. This could be because of issues with non-alphanumeric characters which are not handled </span><span class='tstring_end'>&#39;</span></span> \
<span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>properly by the Urban Dictionary API.</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>

</div>

</div>

<div id="footer">
Generated on Mon Jan 18 11:51:53 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-3.0.0).
</div>

</div>
</body>
</html>
9 changes: 8 additions & 1 deletion docs/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ <h2>Namespace Listing A-Z</h2>
<li class="letter">U</li>
<ul>

<li>
<span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span>

<small>(UrbanDictionary)</small>

</li>

<li>
<span class='object_link'><a href="UrbanDictionary.html" title="UrbanDictionary (module)">UrbanDictionary</a></span>

Expand All @@ -116,7 +123,7 @@ <h2>Namespace Listing A-Z</h2>
</div>

<div id="footer">
Generated on Mon Jan 18 11:24:47 2021 by
Generated on Mon Jan 18 11:51:52 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-3.0.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/class_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 id="full_list_header">Class List</h1>

<ul id="full_list" class="class">
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
<li id='object_Slang' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_UrbanDictionary' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="UrbanDictionary.html" title="UrbanDictionary (module)">UrbanDictionary</a></span><small class='search_info'>Top Level Namespace</small></div></li>
<li id='object_Slang' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Slang.html" title="Slang (class)">Slang</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_UrbanDictionary' class='odd'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="UrbanDictionary.html" title="UrbanDictionary (module)">UrbanDictionary</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_UrbanDictionary::UrbanDictError' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="UrbanDictionary/UrbanDictError.html" title="UrbanDictionary::UrbanDictError (class)">UrbanDictError</a></span> &lt; StandardError<small class='search_info'>UrbanDictionary</small></div></li></ul></li>

</ul>
</div>
Expand Down
Loading

0 comments on commit aef037a

Please sign in to comment.