<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: Hyde::Probe — 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::Probe"; 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 (P)</a> » <span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> » <span class="title">Probe</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::Probe </h1> <div class="box_info"> <dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="Node.html" title="Hyde::Node (class)">Node</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">Hyde::Probe</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> </dl> <dl> <dt>Defined in:</dt> <dd>lib/hyde/probe.rb</dd> </dl> </div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Test probe. Also base for all "reactive" nodes.</p> </div> </div> <div class="tags"> </div><div id="subclasses"> <h2>Direct Known Subclasses</h2> <p class="children"><span class='object_link'><a href="Handlers/Handler.html" title="Hyde::Handlers::Handler (class)">Handlers::Handler</a></span>, <span class='object_link'><a href="Handlers/Serve.html" title="Hyde::Handlers::Serve (class)">Handlers::Serve</a></span></p> </div> <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#properties-instance_method" title="#properties (instance method)">#<strong>properties</strong> ⇒ Object </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>Returns the value of attribute properties.</p> </div></span> </li> </ul> <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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(path, parent:) ⇒ Probe </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'><p>A new instance of Probe.</p> </div></span> </li> <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="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#reject-instance_method" title="Hyde::Node#reject (method)">#reject</a></span></p> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> #<strong>initialize</strong>(path, parent:) ⇒ <tt><span class='object_link'><a href="" title="Hyde::Probe (class)">Probe</a></span></tt> </h3><div class="docstring"> <div class="discussion"> <p>Returns a new instance of Probe.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>path</span> <span class='type'>(<tt>Object</tt>)</span> </li> <li> <span class='name'>parent</span> <span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Hyde::Node (class)">Hyde::Node</a></span></tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 41 42 43</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/hyde/probe.rb', line 41</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>parent:</span><span class='rparen'>)</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>parent:</span> <span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <span id=""></span> <div class="method_details first"> <h3 class="signature first" id="properties-instance_method"> #<strong>properties</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns the value of attribute properties.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 45 46 47</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/hyde/probe.rb', line 45</span> <span class='kw'>def</span> <span class='id identifier rubyid_properties'>properties</span> <span class='ivar'>@properties</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </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. Throws an error upon reaching the path. This behaviour should only be used internally.</p> </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>StandardError</tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 53 54 55 56 57 58 59 60</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/hyde/probe.rb', line 53</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'>return</span> <span class='id identifier rubyid_reject'>reject</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_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>StandardError</span><span class='comma'>,</span> <span class='heredoc_beg'><<~STREND</span> <span class='tstring_content'> probe reached </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_pretty_inspect'>pretty_inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='heredoc_end'> STREND </span><span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Sun Sep 17 00:23:45 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>