360 lines
11 KiB
HTML
360 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Class: Hyde::Handlers::GET
|
|
|
|
— Documentation by YARD 0.9.34
|
|
|
|
</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 = "Hyde::Handlers::GET";
|
|
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 (G)</a> »
|
|
<span class='title'><span class='object_link'><a href="../../Hyde.html" title="Hyde (module)">Hyde</a></span></span> » <span class='title'><span class='object_link'><a href="../Handlers.html" title="Hyde::Handlers (module)">Handlers</a></span></span>
|
|
»
|
|
<span class="title">GET</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>Class: Hyde::Handlers::GET
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
<dl>
|
|
<dt>Inherits:</dt>
|
|
<dd>
|
|
<span class="inheritName"><span class='object_link'><a href="Handler.html" title="Hyde::Handlers::Handler (class)">Handler</a></span></span>
|
|
|
|
<ul class="fullTree">
|
|
<li>Object</li>
|
|
|
|
<li class="next"><span class='object_link'><a href="../Node.html" title="Hyde::Node (class)">Node</a></span></li>
|
|
|
|
<li class="next"><span class='object_link'><a href="../Probe.html" title="Hyde::Probe (class)">Probe</a></span></li>
|
|
|
|
<li class="next"><span class='object_link'><a href="Handler.html" title="Hyde::Handlers::Handler (class)">Handler</a></span></li>
|
|
|
|
<li class="next">Hyde::Handlers::GET</li>
|
|
|
|
</ul>
|
|
<a href="#" class="inheritanceTree">show all</a>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/hyde/probe/http_method.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<h2>Overview</h2><div class="docstring">
|
|
<div class="discussion">
|
|
<p>Probe that executes callback on a GET</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><div id="subclasses">
|
|
<h2>Direct Known Subclasses</h2>
|
|
<p class="children"><span class='object_link'><a href="CONNECT.html" title="Hyde::Handlers::CONNECT (class)">CONNECT</a></span>, <span class='object_link'><a href="DELETE.html" title="Hyde::Handlers::DELETE (class)">DELETE</a></span>, <span class='object_link'><a href="HEAD.html" title="Hyde::Handlers::HEAD (class)">HEAD</a></span>, <span class='object_link'><a href="OPTIONS.html" title="Hyde::Handlers::OPTIONS (class)">OPTIONS</a></span>, <span class='object_link'><a href="PATCH.html" title="Hyde::Handlers::PATCH (class)">PATCH</a></span>, <span class='object_link'><a href="POST.html" title="Hyde::Handlers::POST (class)">POST</a></span>, <span class='object_link'><a href="PUT.html" title="Hyde::Handlers::PUT (class)">PUT</a></span>, <span class='object_link'><a href="TRACE.html" title="Hyde::Handlers::TRACE (class)">TRACE</a></span></p>
|
|
</div>
|
|
|
|
|
|
<h2>
|
|
Constant Summary
|
|
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
</h2>
|
|
|
|
<dl class="constants">
|
|
|
|
<dt id="METHOD-constant" class="">METHOD =
|
|
|
|
</dt>
|
|
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GET</span><span class='tstring_end'>"</span></span></pre></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Handler.html" title="Hyde::Handlers::Handler (class)">Handler</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Handler.html#request-instance_method" title="Hyde::Handlers::Handler#request (method)">#request</a></span>, <span class='object_link'><a href="Handler.html#response-instance_method" title="Hyde::Handlers::Handler#response (method)">#response</a></span></p>
|
|
|
|
|
|
|
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Probe.html" title="Hyde::Probe (class)">Probe</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../Probe.html#properties-instance_method" title="Hyde::Probe#properties (method)">#properties</a></span></p>
|
|
|
|
|
|
|
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Node.html" title="Hyde::Node (class)">Node</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../Node.html#remap-instance_method" title="Hyde::Node#remap (method)">#remap</a></span>, <span class='object_link'><a href="../Node.html#root-instance_method" title="Hyde::Node#root (method)">#root</a></span></p>
|
|
|
|
|
|
|
|
<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="#process-instance_method" title="#process (instance method)">#<strong>process</strong>(request) ⇒ Boolean </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'><p>Method callback on successful request navigation.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Handler.html" title="Hyde::Handlers::Handler (class)">Handler</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Handler.html#initialize-instance_method" title="Hyde::Handlers::Handler#initialize (method)">#initialize</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Probe.html" title="Hyde::Probe (class)">Probe</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../Probe.html#initialize-instance_method" title="Hyde::Probe#initialize (method)">#initialize</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Node.html" title="Hyde::Node (class)">Node</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../Node.html#go-instance_method" title="Hyde::Node#go (method)">#go</a></span>, <span class='object_link'><a href="../Node.html#initialize-instance_method" title="Hyde::Node#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Node.html#reject-instance_method" title="Hyde::Node#reject (method)">#reject</a></span></p>
|
|
<div id="constructor_details" class="method_details_list">
|
|
<h2>Constructor Details</h2>
|
|
|
|
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Handler.html#initialize-instance_method" title="Hyde::Handlers::Handler#initialize (method)">Hyde::Handlers::Handler</a></span></p>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="process-instance_method">
|
|
|
|
#<strong>process</strong>(request) ⇒ <tt>Boolean</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
<p>Method callback on successful request navigation.
|
|
Runs block supplied with object initialization.
|
|
Request's #splat and #param are passed to block.</p>
|
|
|
|
<p>Callback's returned should be one of viable responses:</p>
|
|
|
|
<ul>
|
|
<li><span class='object_link'><a href="../Response.html" title="Hyde::Response (class)">Response</a></span> object</li>
|
|
<li>An array that matches Rack return form</li>
|
|
<li>An array that matches old (Rack 2.x) return form</li>
|
|
<li>A string (returned as HTML with code 200)</li>
|
|
<li>false (bounces the request to next handler)</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>request</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../Request.html" title="Hyde::Request (class)">Hyde::Request</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'><p>true if further navigation is possible</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
<p class="tag_title">Raises:</p>
|
|
<ul class="raise">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>UncaughtThrowError</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'><p>may raise if die() is called.</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
25
|
|
26
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/hyde/probe/http_method.rb', line 25</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_request_method'>request_method</span><span class='period'>.</span><span class='id identifier rubyid_casecmp'>casecmp</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='op'>::</span><span class='const'>METHOD</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span>
|
|
<span class='kw'>return</span> <span class='kw'>false</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Sun Sep 17 00:23:46 2023 by
|
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
0.9.34 (ruby-3.0.6).
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html> |