<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: Hyde::GETHandler — 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::GETHandler"; 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">GETHandler</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::GETHandler </h1> <div class="box_info"> <dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="Handler.html" title="Hyde::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::Handler (class)">Handler</a></span></li> <li class="next">Hyde::GETHandler</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="CONNECTHandler.html" title="Hyde::CONNECTHandler (class)">CONNECTHandler</a></span>, <span class='object_link'><a href="DELETEHandler.html" title="Hyde::DELETEHandler (class)">DELETEHandler</a></span>, <span class='object_link'><a href="HEADHandler.html" title="Hyde::HEADHandler (class)">HEADHandler</a></span>, <span class='object_link'><a href="OPTIONSHandler.html" title="Hyde::OPTIONSHandler (class)">OPTIONSHandler</a></span>, <span class='object_link'><a href="PATCHHandler.html" title="Hyde::PATCHHandler (class)">PATCHHandler</a></span>, <span class='object_link'><a href="POSTHandler.html" title="Hyde::POSTHandler (class)">POSTHandler</a></span>, <span class='object_link'><a href="PUTHandler.html" title="Hyde::PUTHandler (class)">PUTHandler</a></span>, <span class='object_link'><a href="TRACEHandler.html" title="Hyde::TRACEHandler (class)">TRACEHandler</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::Handler (class)">Handler</a></span></h3> <p class="inherited"><span class='object_link'><a href="Handler.html#request-instance_method" title="Hyde::Handler#request (method)">#request</a></span>, <span class='object_link'><a href="Handler.html#response-instance_method" title="Hyde::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::Handler (class)">Handler</a></span></h3> <p class="inherited"><span class='object_link'><a href="Handler.html#initialize-instance_method" title="Hyde::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::Handler#initialize (method)">Hyde::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> <p><span class='object_link'><a href="Response.html" title="Hyde::Response (class)">Response</a></span> object</p> </li><li> <p>An array that matches Rack return form</p> </li><li> <p>An array that matches old (Rack 2.x) return form</p> </li><li> <p>A string (returned as HTML with code 200)</p> </li><li> <p>false (bounces the request to next handler)</p> </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"> 26 27 28 29 30 31 32</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/hyde/probe/http_method.rb', line 26</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 Sat Sep 9 19:10:58 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>