Browse Source
Module restructuring, minor bugfixes, first template engine (incomplete), template engine example
master
Module restructuring, minor bugfixes, first template engine (incomplete), template engine example
master
Yessiest
8 months ago
92 changed files with 10046 additions and 1395 deletions
-
35.yardoc/checksums
-
BIN.yardoc/object_types
-
BIN.yardoc/objects/root.dat
-
1.yardopts
-
2README.md
-
20doc/Hyde.html
-
2doc/Hyde/CONNECTHandler.html
-
2doc/Hyde/DELETEHandler.html
-
11doc/Hyde/DSL.html
-
337doc/Hyde/DSL/CommonMethods.html
-
209doc/Hyde/DSL/PathConstructors.html
-
65doc/Hyde/DSL/PathMethods.html
-
207doc/Hyde/DSL/ProbeConstructors.html
-
333doc/Hyde/DSL/ProbeMethods.html
-
105doc/Hyde/DSL/TemplateMethods.html
-
10doc/Hyde/GETHandler.html
-
2doc/Hyde/HEADHandler.html
-
30doc/Hyde/Handler.html
-
127doc/Hyde/Handlers.html
-
220doc/Hyde/Handlers/CONNECT.html
-
220doc/Hyde/Handlers/DELETE.html
-
360doc/Hyde/Handlers/GET.html
-
220doc/Hyde/Handlers/HEAD.html
-
597doc/Hyde/Handlers/Handler.html
-
220doc/Hyde/Handlers/OPTIONS.html
-
220doc/Hyde/Handlers/PATCH.html
-
220doc/Hyde/Handlers/POST.html
-
220doc/Hyde/Handlers/PUT.html
-
469doc/Hyde/Handlers/Serve.html
-
220doc/Hyde/Handlers/TRACE.html
-
48doc/Hyde/Node.html
-
2doc/Hyde/OPTIONSHandler.html
-
2doc/Hyde/PATCHHandler.html
-
2doc/Hyde/POSTHandler.html
-
2doc/Hyde/PUTHandler.html
-
176doc/Hyde/Path.html
-
242doc/Hyde/PathContext.html
-
57doc/Hyde/Pattern.html
-
13doc/Hyde/PatternMatching.html
-
155doc/Hyde/PatternMatching/Glob.html
-
68doc/Hyde/PatternMatching/ReMatch.html
-
64doc/Hyde/Probe.html
-
249doc/Hyde/ProbeContext.html
-
227doc/Hyde/ProcessorContext.html
-
317doc/Hyde/Request.html
-
87doc/Hyde/Response.html
-
20doc/Hyde/ServeHandler.html
-
47doc/Hyde/Server.html
-
162doc/Hyde/ServerContext.html
-
2doc/Hyde/TRACEHandler.html
-
763doc/Hyde/Template.html
-
249doc/Hyde/TemplateContext.html
-
127doc/Hyde/Templates.html
-
311doc/Hyde/Templates/ERB.html
-
414doc/Hyde/Util.html
-
857doc/Hyde/Util/FormPart.html
-
44doc/Hyde/Util/Lookup.html
-
487doc/Hyde/Util/MultipartParser.html
-
120doc/Hyde/Util/ParserCommon.html
-
175doc/Hyde/Util/Query.html
-
169doc/_index.html
-
2doc/class_list.html
-
6doc/file.README.html
-
6doc/index.html
-
408doc/method_list.html
-
2doc/top-level-namespace.html
-
14examples/extension_testing/extension.ru
-
12examples/extension_testing/external_methods.rb
-
1examples/extension_testing/lib
-
1examples/extension_testing/readme.txt
-
1examples/form/readme.txt
-
4examples/templates/footer.rhtml
-
16examples/templates/helloworld.ru
-
14examples/templates/index.rhtml
-
1examples/templates/lib
-
1examples/templates/readme.txt
-
2lib/hyde.rb
-
78lib/hyde/dsl/constructors_path.rb
-
14lib/hyde/dsl/constructors_probe.rb
-
0lib/hyde/dsl/methods_common.rb
-
0lib/hyde/dsl/methods_path.rb
-
6lib/hyde/dsl/methods_probe.rb
-
9lib/hyde/dsl/methods_template.rb
-
80lib/hyde/dsl/path_constructors.rb
-
30lib/hyde/path.rb
-
35lib/hyde/probe.rb
-
92lib/hyde/probe/handler.rb
-
112lib/hyde/probe/http_method.rb
-
42lib/hyde/probe/serve_handler.rb
-
5lib/hyde/server.rb
-
80lib/hyde/template.rb
-
25lib/hyde/template/erb.rb
@ -1,21 +1,28 @@ |
|||
lib/hyde.rb 775368f05e89c7396fdf9a9c1f55e3537f8fba98 |
|||
lib/hyde.rb 632d043ed6e7484bca963c37e1629e1d88c89b69 |
|||
lib/hyde/node.rb 93d92492390abb2b55649c6d027fa3a2cb8f2014 |
|||
lib/hyde/path.rb 280170523467824ac6ce310500fc88439808d59e |
|||
lib/hyde/probe.rb 994a5527bb30c713c1c70e56195ea6967ae39241 |
|||
lib/hyde/server.rb 3286219acc8606b432d12545e9ba3a57dd227473 |
|||
lib/hyde/request.rb 9baea24ae9975e3a26571878ed7e9da99889584f |
|||
lib/hyde/path.rb 42c04e42ea879ad73f639f2086b3ab5ca40489dc |
|||
lib/hyde/probe.rb 673b55e9aa8c8286a770bd23ae00bff1ac2047fe |
|||
lib/hyde/server.rb 6f15f6c8e67783086bfe70ad03c7ca9b8269c69d |
|||
lib/hyde/request.rb 792427908273455eb694e13d3517cdae43af3454 |
|||
lib/hyde/response.rb 0f0c107c7db883b308b81cbf5c0c4b7d5c90e7ba |
|||
lib/hyde/util/html.rb 3767a1632026ba555ae5517b59728b2e916b61de |
|||
lib/hyde/util/query.rb ffa6f9b6631277d7061f63dd36e4cb431a8169f5 |
|||
lib/hyde/template.rb f3ac5033c5cdb9218b1865b5c9662ba50b813a70 |
|||
lib/hyde/util/html.rb bb83ec3ad162b8702ae054428f33c7d8a041d816 |
|||
lib/hyde/util/query.rb 212e9bd776eac429c2b2a821586ccce97f996df9 |
|||
lib/hyde/util/header.rb ce82b5351a857860b105f25d68ca66c0193359ce |
|||
lib/hyde/util/lookup.rb 5b8e28a8471bb786f4e0a0d616885d238c806661 |
|||
lib/hyde/probe/binding.rb 1a83cfea5e7b620d075798c920dd4af3335871c7 |
|||
lib/hyde/probe/handler.rb 4d45e895a3bfee8e5234be3862c7e201772731b1 |
|||
lib/hyde/dsl/path_methods.rb 0369e370c594f0bd5c987c67791175eeaa8f9c21 |
|||
lib/hyde/template/erb.rb 4d1c85dd55b55030bba1ba4f9c27ea39fd0c1e47 |
|||
lib/hyde/util/sorting.rb af30f01ce32880f7e3e2b0ad6c2324c2fded9431 |
|||
lib/hyde/probe/handler.rb 9b3eb4ce702c40920c04ed0cb3b93984683de447 |
|||
lib/hyde/util/multipart.rb 37abad9fbe044855d02d36185be645f07cb417c0 |
|||
lib/hyde/dsl/methods_path.rb 0369e370c594f0bd5c987c67791175eeaa8f9c21 |
|||
lib/hyde/pattern_matching.rb fe86f6529a2d22c128d9d3a74217862e9fa59c15 |
|||
lib/hyde/dsl/probe_methods.rb a9dd3ddbdf89875d79d5ca3e56fd3a261546dd25 |
|||
lib/hyde/probe/http_method.rb f5f6874998e4a581cd3673a06f3536c8a14e67c8 |
|||
lib/hyde/probe/serve_handler.rb 1690e7dd3f0abe9180a61d474bb89c0a765fc381 |
|||
lib/hyde/dsl/path_constructors.rb 97895412fc27eeb7f3fa379a85972c97a24d97bf |
|||
lib/hyde/dsl/methods_probe.rb c18bb7f712f14e4d08416f77969eb0af07a4f3a7 |
|||
lib/hyde/probe/http_method.rb 26ba5c9dabff5508dbd6efcba1711d6417cf957b |
|||
lib/hyde/dsl/methods_common.rb ea06161f4324127fbbacd51918eadc4e059e4fcf |
|||
lib/hyde/probe/serve_handler.rb 6c1d2a7b949700468342ced4c23c7fe60df4d3f0 |
|||
lib/hyde/dsl/methods_template.rb c77827f2a4133142b7f9f9dfe0bb49efb3b23d44 |
|||
lib/hyde/dsl/constructors_path.rb d9fafcfae4d6aab9bd85a7de955eb74f8d4d5937 |
|||
lib/hyde/pattern_matching/glob.rb 16595083bc8d6f7b98f4adda502a05bd411bc1ca |
|||
lib/hyde/pattern_matching/util.rb 188dc7d5d9a9a6538a01943a83eb132c385dc092 |
|||
lib/hyde/dsl/constructors_probe.rb 6295d25bfa4e896b122590e79e57a03111ed2f09 |
|||
lib/hyde/pattern_matching/rematch.rb 54a4f94791e68d85c38034d954e4c3174e01511b |
@ -0,0 +1 @@ |
|||
--markup=markdown --markup-provider=redcarpet |
@ -0,0 +1,337 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::DSL::CommonMethods |
|||
|
|||
— 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::DSL::CommonMethods"; |
|||
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 (C)</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="../DSL.html" title="Hyde::DSL (module)">DSL</a></span></span> |
|||
» |
|||
<span class="title">CommonMethods</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>Module: Hyde::DSL::CommonMethods |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Included in:</dt> |
|||
<dd><span class='object_link'><a href="../ProbeContext.html" title="Hyde::ProbeContext (class)">ProbeContext</a></span>, <span class='object_link'><a href="../ProcessorContext.html" title="Hyde::ProcessorContext (class)">ProcessorContext</a></span>, <span class='object_link'><a href="../TemplateContext.html" title="Hyde::TemplateContext (class)">TemplateContext</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/dsl/methods_common.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Methods shared by probes, preprocessors and filters.</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="#bounce-instance_method" title="#bounce (instance method)">#<strong>bounce</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Bounce request to the next handler.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#die-instance_method" title="#die (instance method)">#<strong>die</strong>(errorcode, backtrace: nil) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Stop execution and generate a boilerplate response with the given code.</p> |
|||
</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="bounce-instance_method"> |
|||
|
|||
#<strong>bounce</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Bounce request to the next handler</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Raises:</p> |
|||
<ul class="raise"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>UncaughtThrowError</tt>)</span> |
|||
|
|||
|
|||
|
|||
— |
|||
<div class='inline'><p>throws :break to get out of the callback</p> |
|||
</div> |
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
23 |
|||
24 |
|||
25</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/dsl/methods_common.rb', line 23</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_bounce'>bounce</span> |
|||
<span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:break</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="die-instance_method"> |
|||
|
|||
#<strong>die</strong>(errorcode, backtrace: nil) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Stop execution and generate a boilerplate response with the given code</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
<p class="tag_title">Parameters:</p> |
|||
<ul class="param"> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>errorcode</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Integer</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>backtrace</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Array(String)</tt>, <tt>nil</tt>)</span> |
|||
|
|||
|
|||
<em class="default">(defaults to: <tt>nil</tt>)</em> |
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
<p class="tag_title">Raises:</p> |
|||
<ul class="raise"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>UncaughtThrowError</tt>)</span> |
|||
|
|||
|
|||
|
|||
— |
|||
<div class='inline'><p>throws :finish to return back to Server</p> |
|||
</div> |
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
11 |
|||
12 |
|||
13 |
|||
14 |
|||
15 |
|||
16 |
|||
17 |
|||
18 |
|||
19</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/dsl/methods_common.rb', line 11</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_die'>die</span><span class='lparen'>(</span><span class='id identifier rubyid_errorcode'>errorcode</span><span class='comma'>,</span> <span class='label'>backtrace:</span> <span class='kw'>nil</span><span class='rparen'>)</span> |
|||
<span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:finish</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_errorcode'>errorcode</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span> |
|||
<span class='op'>*</span><span class='lparen'>(</span><span class='ivar'>@origin</span><span class='period'>.</span><span class='id identifier rubyid_properties'>properties</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>handle.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_errorcode'>errorcode</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>or</span> |
|||
<span class='ivar'>@origin</span><span class='period'>.</span><span class='id identifier rubyid_properties'>properties</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>handle.default</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span> |
|||
<span class='id identifier rubyid_errorcode'>errorcode</span><span class='comma'>,</span> |
|||
<span class='label'>backtrace:</span> <span class='id identifier rubyid_backtrace'>backtrace</span> |
|||
<span class='rparen'>)</span> |
|||
<span class='rparen'>)</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,207 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::DSL::ProbeConstructors |
|||
|
|||
— 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::DSL::ProbeConstructors"; |
|||
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'><span class='object_link'><a href="../DSL.html" title="Hyde::DSL (module)">DSL</a></span></span> |
|||
» |
|||
<span class="title">ProbeConstructors</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>Module: Hyde::DSL::ProbeConstructors |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Included in:</dt> |
|||
<dd><span class='object_link'><a href="../ProbeContext.html" title="Hyde::ProbeContext (class)">ProbeContext</a></span>, <span class='object_link'><a href="../TemplateContext.html" title="Hyde::TemplateContext (class)">TemplateContext</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/dsl/constructors_probe.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Probe (and subclasses) DSL construct</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="#erb-instance_method" title="#erb (instance method)">#<strong>erb</strong>(input, toplevel: nil, locals: nil) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Create a new erb template.</p> |
|||
</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="erb-instance_method"> |
|||
|
|||
#<strong>erb</strong>(input, toplevel: nil, locals: nil) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Create a new erb template</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
<p class="tag_title">See Also:</p> |
|||
<ul class="see"> |
|||
|
|||
<li>Template#new</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
9 |
|||
10 |
|||
11</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/dsl/constructors_probe.rb', line 9</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_erb'>erb</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>toplevel:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='kw'>nil</span><span class='rparen'>)</span> |
|||
<span class='const'><span class='object_link'><a href="../../Hyde.html" title="Hyde (module)">Hyde</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Templates.html" title="Hyde::Templates (module)">Templates</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Templates/ERB.html" title="Hyde::Templates::ERB (class)">ERB</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Templates/ERB.html#initialize-instance_method" title="Hyde::Templates::ERB#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>toplevel:</span> <span class='id identifier rubyid_toplevel'>toplevel</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='id identifier rubyid_locals'>locals</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,105 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::DSL::TemplateMethods |
|||
|
|||
— 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::DSL::TemplateMethods"; |
|||
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 (T)</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="../DSL.html" title="Hyde::DSL (module)">DSL</a></span></span> |
|||
» |
|||
<span class="title">TemplateMethods</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>Module: Hyde::DSL::TemplateMethods |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/dsl/methods_template.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,127 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::Handlers |
|||
|
|||
— 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"; |
|||
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 (H)</a> » |
|||
<span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> |
|||
» |
|||
<span class="title">Handlers</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>Module: Hyde::Handlers |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/probe.rb<span class="defines">,<br /> |
|||
lib/hyde/probe/handler.rb,<br /> lib/hyde/probe/http_method.rb,<br /> lib/hyde/probe/serve_handler.rb</span> |
|||
</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>All subclasses of Hyde::Probe that respond to requests</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><h2>Defined Under Namespace</h2> |
|||
<p class="children"> |
|||
|
|||
|
|||
|
|||
|
|||
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Handlers/CONNECT.html" title="Hyde::Handlers::CONNECT (class)">CONNECT</a></span>, <span class='object_link'><a href="Handlers/DELETE.html" title="Hyde::Handlers::DELETE (class)">DELETE</a></span>, <span class='object_link'><a href="Handlers/GET.html" title="Hyde::Handlers::GET (class)">GET</a></span>, <span class='object_link'><a href="Handlers/HEAD.html" title="Hyde::Handlers::HEAD (class)">HEAD</a></span>, <span class='object_link'><a href="Handlers/Handler.html" title="Hyde::Handlers::Handler (class)">Handler</a></span>, <span class='object_link'><a href="Handlers/OPTIONS.html" title="Hyde::Handlers::OPTIONS (class)">OPTIONS</a></span>, <span class='object_link'><a href="Handlers/PATCH.html" title="Hyde::Handlers::PATCH (class)">PATCH</a></span>, <span class='object_link'><a href="Handlers/POST.html" title="Hyde::Handlers::POST (class)">POST</a></span>, <span class='object_link'><a href="Handlers/PUT.html" title="Hyde::Handlers::PUT (class)">PUT</a></span>, <span class='object_link'><a href="Handlers/Serve.html" title="Hyde::Handlers::Serve (class)">Serve</a></span>, <span class='object_link'><a href="Handlers/TRACE.html" title="Hyde::Handlers::TRACE (class)">TRACE</a></span> |
|||
|
|||
|
|||
</p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:01 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::CONNECT |
|||
|
|||
— 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::CONNECT"; |
|||
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 (C)</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">CONNECT</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::CONNECT |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::CONNECT</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 CONNECT</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>CONNECT</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::DELETE |
|||
|
|||
— 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::DELETE"; |
|||
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 (D)</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">DELETE</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::DELETE |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::DELETE</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 DELETE</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>DELETE</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,360 @@ |
|||
<!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 Wed Sep 13 02:08:04 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::HEAD |
|||
|
|||
— 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::HEAD"; |
|||
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 (H)</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">HEAD</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::HEAD |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::HEAD</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 HEAD</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>HEAD</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,597 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::Handler |
|||
|
|||
— 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::Handler"; |
|||
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 (H)</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">Handler</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::Handler |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="../Probe.html" title="Hyde::Probe (class)">Probe</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">Hyde::Handlers::Handler</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/probe/handler.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Probe that executes a callback on request</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><div id="subclasses"> |
|||
<h2>Direct Known Subclasses</h2> |
|||
<p class="children"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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="#request-instance_method" title="#request (instance method)">#<strong>request</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
<span class="note title readonly">readonly</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute request.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#response-instance_method" title="#response (instance method)">#<strong>response</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute response.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(path, parent:, &exec) ⇒ Handler </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of Handler.</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:, &exec) ⇒ <tt><span class='object_link'><a href="" title="Hyde::Handlers::Handler (class)">Handler</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of Handler.</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> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>exec</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>#call</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
12 |
|||
13 |
|||
14 |
|||
15 |
|||
16 |
|||
17</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/handler.rb', line 12</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='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_exec'>exec</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='ivar'>@callback</span> <span class='op'>=</span> <span class='id identifier rubyid_exec'>exec</span> |
|||
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Hyde.html" title="Hyde (module)">Hyde</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ProbeContext.html" title="Hyde::ProbeContext (class)">ProbeContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../ProbeContext.html#initialize-instance_method" title="Hyde::ProbeContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@response</span> <span class='op'>=</span> <span class='kw'>nil</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="request-instance_method"> |
|||
|
|||
#<strong>request</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns the value of attribute request.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
20 |
|||
21 |
|||
22</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/handler.rb', line 20</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span> |
|||
<span class='ivar'>@request</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
|
|||
<span id="response=-instance_method"></span> |
|||
<div class="method_details "> |
|||
<h3 class="signature " id="response-instance_method"> |
|||
|
|||
#<strong>response</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns the value of attribute response.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
19 |
|||
20 |
|||
21</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/handler.rb', line 19</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_response'>response</span> |
|||
<span class='ivar'>@response</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. |
|||
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"> |
|||
|
|||
|
|||
36 |
|||
37 |
|||
38 |
|||
39 |
|||
40 |
|||
41 |
|||
42 |
|||
43 |
|||
44 |
|||
45 |
|||
46 |
|||
47 |
|||
48 |
|||
49 |
|||
50 |
|||
51 |
|||
52 |
|||
53</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/handler.rb', line 36</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='ivar'>@response</span> <span class='op'>=</span> <span class='kw'>nil</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='ivar'>@request</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span> |
|||
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:break</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='ivar'>@context</span><span class='period'>.</span><span class='id identifier rubyid_instance_exec'>instance_exec</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span><span class='comma'>,</span> |
|||
<span class='op'>**</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_param'>param</span><span class='comma'>,</span> |
|||
<span class='op'>&</span><span class='ivar'>@callback</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_response'>response</span> |
|||
|
|||
<span class='kw'>if</span> <span class='ivar'>@response</span> <span class='kw'>and</span> <span class='lbracket'>[</span><span class='const'>String</span><span class='comma'>,</span> <span class='const'>File</span><span class='comma'>,</span> <span class='const'>IO</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> |
|||
<span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span> |
|||
<span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:finish</span><span class='comma'>,</span> <span class='ivar'>@response</span> |
|||
<span class='kw'>end</span> |
|||
<span class='id identifier rubyid_throw'>throw</span> <span class='symbol'>:finish</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:04 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::OPTIONS |
|||
|
|||
— 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::OPTIONS"; |
|||
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 (O)</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">OPTIONS</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::OPTIONS |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::OPTIONS</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 OPTIONS</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>OPTIONS</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::PATCH |
|||
|
|||
— 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::PATCH"; |
|||
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'><span class='object_link'><a href="../Handlers.html" title="Hyde::Handlers (module)">Handlers</a></span></span> |
|||
» |
|||
<span class="title">PATCH</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::PATCH |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::PATCH</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 PATCH</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>PATCH</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::POST |
|||
|
|||
— 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::POST"; |
|||
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'><span class='object_link'><a href="../Handlers.html" title="Hyde::Handlers (module)">Handlers</a></span></span> |
|||
» |
|||
<span class="title">POST</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::POST |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::POST</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 POST</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>POST</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:04 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::PUT |
|||
|
|||
— 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::PUT"; |
|||
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'><span class='object_link'><a href="../Handlers.html" title="Hyde::Handlers (module)">Handlers</a></span></span> |
|||
» |
|||
<span class="title">PUT</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::PUT |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::PUT</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 PUT</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>PUT</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,469 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::Serve |
|||
|
|||
— 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::Serve"; |
|||
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 (S)</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">Serve</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::Serve |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="../Probe.html" title="Hyde::Probe (class)">Probe</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">Hyde::Handlers::Serve</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/probe/serve_handler.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Probe that sends files from a location</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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="#response-instance_method" title="#response (instance method)">#<strong>response</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute response.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(path, parent:) ⇒ Serve </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of Serve.</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::Handlers::Serve (class)">Serve</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of Serve.</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> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>exec</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>#call</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
12 |
|||
13 |
|||
14</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/serve_handler.rb', line 12</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="response=-instance_method"></span> |
|||
<div class="method_details first"> |
|||
<h3 class="signature first" id="response-instance_method"> |
|||
|
|||
#<strong>response</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns the value of attribute response.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
16 |
|||
17 |
|||
18</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/serve_handler.rb', line 16</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_response'>response</span> |
|||
<span class='ivar'>@response</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. |
|||
Tries to serve files matched by handler</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 file was found</p> |
|||
</div> |
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe/serve_handler.rb', line 22</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='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_filepath'>filepath</span><span class='rparen'>)</span> |
|||
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span> <span class='ivar'>@properties</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>path</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> |
|||
|
|||
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_delete_suffix'>delete_suffix</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> |
|||
<span class='kw'>rescue</span> <span class='const'>StandardError</span> |
|||
<span class='kw'>false</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,220 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Handlers::TRACE |
|||
|
|||
— 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::TRACE"; |
|||
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 (T)</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">TRACE</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::TRACE |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</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"><span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></li> |
|||
|
|||
<li class="next">Hyde::Handlers::TRACE</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 TRACE</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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'>TRACE</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>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="GET.html" title="Hyde::Handlers::GET (class)">GET</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="GET.html#process-instance_method" title="Hyde::Handlers::GET#process (method)">#process</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>, <span class='object_link'><a href="Handler.html#process-instance_method" title="Hyde::Handlers::Handler#process (method)">#process</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>, <span class='object_link'><a href="../Probe.html#process-instance_method" title="Hyde::Probe#process (method)">#process</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#process-instance_method" title="Hyde::Node#process (method)">#process</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> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:05 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> |
@ -0,0 +1,242 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::PathContext |
|||
|
|||
— 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::PathContext"; |
|||
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">PathContext</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::PathContext |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::PathContext</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Includes:</dt> |
|||
<dd><span class='object_link'><a href="DSL/PathConstructors.html" title="Hyde::DSL::PathConstructors (module)">DSL::PathConstructors</a></span>, <span class='object_link'><a href="DSL/PathMethods.html" title="Hyde::DSL::PathMethods (module)">DSL::PathMethods</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/path.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Execution context for path setup block.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><div id="subclasses"> |
|||
<h2>Direct Known Subclasses</h2> |
|||
<p class="children"><span class='object_link'><a href="ServerContext.html" title="Hyde::ServerContext (class)">ServerContext</a></span></p> |
|||
</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(path) ⇒ PathContext </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of PathContext.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/PathMethods.html" title="Hyde::DSL::PathMethods (module)">DSL::PathMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/PathMethods.html#filter-instance_method" title="Hyde::DSL::PathMethods#filter (method)">#filter</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#index-instance_method" title="Hyde::DSL::PathMethods#index (method)">#index</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#postprocess-instance_method" title="Hyde::DSL::PathMethods#postprocess (method)">#postprocess</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#preprocess-instance_method" title="Hyde::DSL::PathMethods#preprocess (method)">#preprocess</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#remap-instance_method" title="Hyde::DSL::PathMethods#remap (method)">#remap</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#root-instance_method" title="Hyde::DSL::PathMethods#root (method)">#root</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/PathConstructors.html" title="Hyde::DSL::PathConstructors (module)">DSL::PathConstructors</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/PathConstructors.html#connect-instance_method" title="Hyde::DSL::PathConstructors#connect (method)">#connect</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#delete-instance_method" title="Hyde::DSL::PathConstructors#delete (method)">#delete</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#get-instance_method" title="Hyde::DSL::PathConstructors#get (method)">#get</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#head-instance_method" title="Hyde::DSL::PathConstructors#head (method)">#head</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#options-instance_method" title="Hyde::DSL::PathConstructors#options (method)">#options</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#patch-instance_method" title="Hyde::DSL::PathConstructors#patch (method)">#patch</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#path-instance_method" title="Hyde::DSL::PathConstructors#path (method)">#path</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#post-instance_method" title="Hyde::DSL::PathConstructors#post (method)">#post</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#probe-instance_method" title="Hyde::DSL::PathConstructors#probe (method)">#probe</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#put-instance_method" title="Hyde::DSL::PathConstructors#put (method)">#put</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#register-instance_method" title="Hyde::DSL::PathConstructors#register (method)">#register</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#serve-instance_method" title="Hyde::DSL::PathConstructors#serve (method)">#serve</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#trace-instance_method" title="Hyde::DSL::PathConstructors#trace (method)">#trace</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) ⇒ <tt><span class='object_link'><a href="" title="Hyde::PathContext (class)">PathContext</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of PathContext.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
25 |
|||
26 |
|||
27</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/path.rb', line 25</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='rparen'>)</span> |
|||
<span class='ivar'>@origin</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,249 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::ProbeContext |
|||
|
|||
— 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::ProbeContext"; |
|||
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">ProbeContext</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::ProbeContext |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::ProbeContext</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Includes:</dt> |
|||
<dd><span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span>, <span class='object_link'><a href="DSL/ProbeConstructors.html" title="Hyde::DSL::ProbeConstructors (module)">DSL::ProbeConstructors</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html" title="Hyde::DSL::ProbeMethods (module)">DSL::ProbeMethods</a></span></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>Context that provides execution context for Probes.</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(origin) ⇒ ProbeContext </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of ProbeContext.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/CommonMethods.html#bounce-instance_method" title="Hyde::DSL::CommonMethods#bounce (method)">#bounce</a></span>, <span class='object_link'><a href="DSL/CommonMethods.html#die-instance_method" title="Hyde::DSL::CommonMethods#die (method)">#die</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/ProbeMethods.html" title="Hyde::DSL::ProbeMethods (module)">DSL::ProbeMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/ProbeMethods.html#file-instance_method" title="Hyde::DSL::ProbeMethods#file (method)">#file</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#form-instance_method" title="Hyde::DSL::ProbeMethods#form (method)">#form</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#form%3F-instance_method" title="Hyde::DSL::ProbeMethods#form? (method)">#form?</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#header-instance_method" title="Hyde::DSL::ProbeMethods#header (method)">#header</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#remove_header-instance_method" title="Hyde::DSL::ProbeMethods#remove_header (method)">#remove_header</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#request-instance_method" title="Hyde::DSL::ProbeMethods#request (method)">#request</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#status-instance_method" title="Hyde::DSL::ProbeMethods#status (method)">#status</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/ProbeConstructors.html" title="Hyde::DSL::ProbeConstructors (module)">DSL::ProbeConstructors</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/ProbeConstructors.html#erb-instance_method" title="Hyde::DSL::ProbeConstructors#erb (method)">#erb</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>(origin) ⇒ <tt><span class='object_link'><a href="" title="Hyde::ProbeContext (class)">ProbeContext</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of ProbeContext.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
32 |
|||
33 |
|||
34</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/probe.rb', line 32</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_origin'>origin</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@origin</span> <span class='op'>=</span> <span class='id identifier rubyid_origin'>origin</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,227 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::ProcessorContext |
|||
|
|||
— 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::ProcessorContext"; |
|||
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">ProcessorContext</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::ProcessorContext |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::ProcessorContext</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Includes:</dt> |
|||
<dd><span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/path.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Execution context for filters and preprocessors.</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(path) ⇒ ProcessorContext </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of ProcessorContext.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/CommonMethods.html#bounce-instance_method" title="Hyde::DSL::CommonMethods#bounce (method)">#bounce</a></span>, <span class='object_link'><a href="DSL/CommonMethods.html#die-instance_method" title="Hyde::DSL::CommonMethods#die (method)">#die</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) ⇒ <tt><span class='object_link'><a href="" title="Hyde::ProcessorContext (class)">ProcessorContext</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of ProcessorContext.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
15 |
|||
16 |
|||
17</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/path.rb', line 15</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='rparen'>)</span> |
|||
<span class='ivar'>@origin</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:02 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> |
@ -0,0 +1,162 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::ServerContext |
|||
|
|||
— 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::ServerContext"; |
|||
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 (S)</a> » |
|||
<span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> |
|||
» |
|||
<span class="title">ServerContext</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::ServerContext |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="PathContext.html" title="Hyde::PathContext (class)">PathContext</a></span></span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next"><span class='object_link'><a href="PathContext.html" title="Hyde::PathContext (class)">PathContext</a></span></li> |
|||
|
|||
<li class="next">Hyde::ServerContext</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/server.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h2>Method Summary</h2> |
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="PathContext.html" title="Hyde::PathContext (class)">PathContext</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="PathContext.html#initialize-instance_method" title="Hyde::PathContext#initialize (method)">#initialize</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/PathMethods.html" title="Hyde::DSL::PathMethods (module)">DSL::PathMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/PathMethods.html#filter-instance_method" title="Hyde::DSL::PathMethods#filter (method)">#filter</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#index-instance_method" title="Hyde::DSL::PathMethods#index (method)">#index</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#postprocess-instance_method" title="Hyde::DSL::PathMethods#postprocess (method)">#postprocess</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#preprocess-instance_method" title="Hyde::DSL::PathMethods#preprocess (method)">#preprocess</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#remap-instance_method" title="Hyde::DSL::PathMethods#remap (method)">#remap</a></span>, <span class='object_link'><a href="DSL/PathMethods.html#root-instance_method" title="Hyde::DSL::PathMethods#root (method)">#root</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/PathConstructors.html" title="Hyde::DSL::PathConstructors (module)">DSL::PathConstructors</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/PathConstructors.html#connect-instance_method" title="Hyde::DSL::PathConstructors#connect (method)">#connect</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#delete-instance_method" title="Hyde::DSL::PathConstructors#delete (method)">#delete</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#get-instance_method" title="Hyde::DSL::PathConstructors#get (method)">#get</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#head-instance_method" title="Hyde::DSL::PathConstructors#head (method)">#head</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#options-instance_method" title="Hyde::DSL::PathConstructors#options (method)">#options</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#patch-instance_method" title="Hyde::DSL::PathConstructors#patch (method)">#patch</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#path-instance_method" title="Hyde::DSL::PathConstructors#path (method)">#path</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#post-instance_method" title="Hyde::DSL::PathConstructors#post (method)">#post</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#probe-instance_method" title="Hyde::DSL::PathConstructors#probe (method)">#probe</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#put-instance_method" title="Hyde::DSL::PathConstructors#put (method)">#put</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#register-instance_method" title="Hyde::DSL::PathConstructors#register (method)">#register</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#serve-instance_method" title="Hyde::DSL::PathConstructors#serve (method)">#serve</a></span>, <span class='object_link'><a href="DSL/PathConstructors.html#trace-instance_method" title="Hyde::DSL::PathConstructors#trace (method)">#trace</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="PathContext.html#initialize-instance_method" title="Hyde::PathContext#initialize (method)">Hyde::PathContext</a></span></p> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:03 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> |
@ -0,0 +1,763 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Template |
|||
|
|||
— 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::Template"; |
|||
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 (T)</a> » |
|||
<span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> |
|||
» |
|||
<span class="title">Template</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::Template |
|||
<span class="abstract note title">Abstract</span> |
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::Template</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/template.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<div class="note abstract"> |
|||
<strong>This class is abstract.</strong> |
|||
<div class='inline'><p>does not represent any actual template engine.</p> |
|||
</div> |
|||
</div> |
|||
<p>Interface for Template engines</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><div id="subclasses"> |
|||
<h2>Direct Known Subclasses</h2> |
|||
<p class="children"><span class='object_link'><a href="Templates/ERB.html" title="Hyde::Templates::ERB (class)">Hyde::Templates::ERB</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="#binding-instance_method" title="#binding (instance method)">#<strong>binding</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute binding.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>(input, toplevel: nil, locals: nil) ⇒ Template </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of Template.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#local_variable_get-instance_method" title="#local_variable_get (instance method)">#<strong>local_variable_get</strong>(key) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Get local variable.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#local_variable_set-instance_method" title="#local_variable_set (instance method)">#<strong>local_variable_set</strong>(key, value) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Set local variable.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#local_variables-instance_method" title="#local_variables (instance method)">#<strong>local_variables</strong> ⇒ Array(Symbol) </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Get an array of defined local variables.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#override_locals-instance_method" title="#override_locals (instance method)">#<strong>override_locals</strong>(vars) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Override binding variables.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Run the template.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
<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>(input, toplevel: nil, locals: nil) ⇒ <tt><span class='object_link'><a href="" title="Hyde::Template (class)">Template</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of Template.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
<p class="tag_title">Parameters:</p> |
|||
<ul class="param"> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>input</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>String</tt>, <tt>File</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>context</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Binding</tt>, <tt>nil</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>locals</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span> |
|||
|
|||
|
|||
<em class="default">(defaults to: <tt>nil</tt>)</em> |
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
30 |
|||
31 |
|||
32 |
|||
33 |
|||
34 |
|||
35 |
|||
36 |
|||
37 |
|||
38</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 30</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>toplevel:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='kw'>nil</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@template</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>File</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span> <span class='op'>:</span> <span class='id identifier rubyid_input'>input</span> |
|||
<span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>if</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>File</span> |
|||
<span class='ivar'>@binding</span> <span class='op'>=</span> <span class='id identifier rubyid_toplevel'>toplevel</span> <span class='kw'>or</span> <span class='id identifier rubyid_binding'>binding</span> |
|||
<span class='id identifier rubyid_locals'>locals</span><span class='op'>&.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> |
|||
<span class='ivar'>@binding</span><span class='period'>.</span><span class='id identifier rubyid_local_variable_set'>local_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span> |
|||
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="TemplateContext.html" title="Hyde::TemplateContext (class)">TemplateContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TemplateContext.html#initialize-instance_method" title="Hyde::TemplateContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</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="binding=-instance_method"></span> |
|||
<div class="method_details first"> |
|||
<h3 class="signature first" id="binding-instance_method"> |
|||
|
|||
#<strong>binding</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns the value of attribute binding.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
74 |
|||
75 |
|||
76</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 74</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_binding'>binding</span> |
|||
<span class='ivar'>@binding</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="local_variable_get-instance_method"> |
|||
|
|||
#<strong>local_variable_get</strong>(key) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Get local variable</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
<p class="tag_title">Parameters:</p> |
|||
<ul class="param"> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>key</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Symbol</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>Object</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
50 |
|||
51 |
|||
52</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 50</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_local_variable_get'>local_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@binding</span><span class='period'>.</span><span class='id identifier rubyid_local_variable_get'>local_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="local_variable_set-instance_method"> |
|||
|
|||
#<strong>local_variable_set</strong>(key, value) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Set local variable</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
<p class="tag_title">Parameters:</p> |
|||
<ul class="param"> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>key</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Symbol</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>value</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Object</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
43 |
|||
44 |
|||
45</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 43</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_local_variable_set'>local_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@binding</span><span class='period'>.</span><span class='id identifier rubyid_local_variable_set'>local_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="local_variables-instance_method"> |
|||
|
|||
#<strong>local_variables</strong> ⇒ <tt>Array(Symbol)</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Get an array of defined local variables</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>Array(Symbol)</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
56 |
|||
57 |
|||
58</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 56</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_local_variables'>local_variables</span> |
|||
<span class='ivar'>@binding</span><span class='period'>.</span><span class='id identifier rubyid_local_variables'>local_variables</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="override_locals-instance_method"> |
|||
|
|||
#<strong>override_locals</strong>(vars) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Override binding variables.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
<p class="tag_title">Parameters:</p> |
|||
<ul class="param"> |
|||
|
|||
<li> |
|||
|
|||
<span class='name'>vars</span> |
|||
|
|||
|
|||
<span class='type'>(<tt>Hash{Symbol => Object}</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
62 |
|||
63 |
|||
64 |
|||
65 |
|||
66</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 62</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_override_locals'>override_locals</span><span class='lparen'>(</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span> |
|||
<span class='id identifier rubyid_vars'>vars</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_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> |
|||
<span class='ivar'>@binding</span><span class='period'>.</span><span class='id identifier rubyid_local_variable_set'>local_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="run-instance_method"> |
|||
|
|||
#<strong>run</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
|
|||
<div class="note notetag"> |
|||
<strong>Note:</strong> |
|||
<div class='inline'><p>This method is a stub.</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<p>Run the template</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
70 |
|||
71 |
|||
72</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 70</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span> |
|||
<span class='comment'># ... (stub) |
|||
</span><span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:03 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> |
@ -0,0 +1,249 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::TemplateContext |
|||
|
|||
— 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::TemplateContext"; |
|||
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 (T)</a> » |
|||
<span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> |
|||
» |
|||
<span class="title">TemplateContext</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::TemplateContext |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::TemplateContext</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Includes:</dt> |
|||
<dd><span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span>, <span class='object_link'><a href="DSL/ProbeConstructors.html" title="Hyde::DSL::ProbeConstructors (module)">DSL::ProbeConstructors</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html" title="Hyde::DSL::ProbeMethods (module)">DSL::ProbeMethods</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/template.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Context for template engines</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent) ⇒ TemplateContext </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of TemplateContext.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/ProbeConstructors.html" title="Hyde::DSL::ProbeConstructors (module)">DSL::ProbeConstructors</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/ProbeConstructors.html#erb-instance_method" title="Hyde::DSL::ProbeConstructors#erb (method)">#erb</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/ProbeMethods.html" title="Hyde::DSL::ProbeMethods (module)">DSL::ProbeMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/ProbeMethods.html#file-instance_method" title="Hyde::DSL::ProbeMethods#file (method)">#file</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#form-instance_method" title="Hyde::DSL::ProbeMethods#form (method)">#form</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#form%3F-instance_method" title="Hyde::DSL::ProbeMethods#form? (method)">#form?</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#header-instance_method" title="Hyde::DSL::ProbeMethods#header (method)">#header</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#remove_header-instance_method" title="Hyde::DSL::ProbeMethods#remove_header (method)">#remove_header</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#request-instance_method" title="Hyde::DSL::ProbeMethods#request (method)">#request</a></span>, <span class='object_link'><a href="DSL/ProbeMethods.html#status-instance_method" title="Hyde::DSL::ProbeMethods#status (method)">#status</a></span></p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods included from <span class='object_link'><a href="DSL/CommonMethods.html" title="Hyde::DSL::CommonMethods (module)">DSL::CommonMethods</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="DSL/CommonMethods.html#bounce-instance_method" title="Hyde::DSL::CommonMethods#bounce (method)">#bounce</a></span>, <span class='object_link'><a href="DSL/CommonMethods.html#die-instance_method" title="Hyde::DSL::CommonMethods#die (method)">#die</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>(parent) ⇒ <tt><span class='object_link'><a href="" title="Hyde::TemplateContext (class)">TemplateContext</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of TemplateContext.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
19 |
|||
20 |
|||
21</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template.rb', line 19</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@origin</span> <span class='op'>=</span> <span class='id identifier rubyid_parent'>parent</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:03 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> |
@ -0,0 +1,127 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::Templates |
|||
|
|||
— 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::Templates"; |
|||
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 (T)</a> » |
|||
<span class='title'><span class='object_link'><a href="../Hyde.html" title="Hyde (module)">Hyde</a></span></span> |
|||
» |
|||
<span class="title">Templates</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>Module: Hyde::Templates |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/template.rb<span class="defines">,<br /> |
|||
lib/hyde/template/erb.rb</span> |
|||
</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>All template engine adapters subclassed from Template</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><h2>Defined Under Namespace</h2> |
|||
<p class="children"> |
|||
|
|||
|
|||
|
|||
|
|||
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Templates/ERB.html" title="Hyde::Templates::ERB (class)">ERB</a></span> |
|||
|
|||
|
|||
</p> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:01 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> |
@ -0,0 +1,311 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Templates::ERB |
|||
|
|||
— 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::Templates::ERB"; |
|||
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 (E)</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="../Templates.html" title="Hyde::Templates (module)">Templates</a></span></span> |
|||
» |
|||
<span class="title">ERB</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::Templates::ERB |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName"><span class='object_link'><a href="../Template.html" title="Hyde::Template (class)">Hyde::Template</a></span></span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next"><span class='object_link'><a href="../Template.html" title="Hyde::Template (class)">Hyde::Template</a></span></li> |
|||
|
|||
<li class="next">Hyde::Templates::ERB</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/template/erb.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>ERB Template language adapter</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h2>Instance Attribute Summary</h2> |
|||
|
|||
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Template.html" title="Hyde::Template (class)">Hyde::Template</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="../Template.html#binding-instance_method" title="Hyde::Template#binding (method)">#binding</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>(input, toplevel: nil, locals: nil) ⇒ ERB </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of ERB.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Run the template.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Template.html" title="Hyde::Template (class)">Hyde::Template</a></span></h3> |
|||
<p class="inherited"><span class='object_link'><a href="../Template.html#local_variable_get-instance_method" title="Hyde::Template#local_variable_get (method)">#local_variable_get</a></span>, <span class='object_link'><a href="../Template.html#local_variable_set-instance_method" title="Hyde::Template#local_variable_set (method)">#local_variable_set</a></span>, <span class='object_link'><a href="../Template.html#local_variables-instance_method" title="Hyde::Template#local_variables (method)">#local_variables</a></span>, <span class='object_link'><a href="../Template.html#override_locals-instance_method" title="Hyde::Template#override_locals (method)">#override_locals</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>(input, toplevel: nil, locals: nil) ⇒ <tt><span class='object_link'><a href="" title="Hyde::Templates::ERB (class)">ERB</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of ERB.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
<p class="tag_title">See Also:</p> |
|||
<ul class="see"> |
|||
|
|||
<li>Hyde::Template#new</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
11 |
|||
12 |
|||
13 |
|||
14</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template/erb.rb', line 11</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>toplevel:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='kw'>nil</span><span class='rparen'>)</span> |
|||
<span class='kw'>super</span> |
|||
<span class='ivar'>@template</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>ERB</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@template</span><span class='rparen'>)</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="run-instance_method"> |
|||
|
|||
#<strong>run</strong> ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Run the template.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/template/erb.rb', line 17</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span> |
|||
<span class='ivar'>@context</span><span class='period'>.</span><span class='id identifier rubyid_instance_exec'>instance_exec</span><span class='lparen'>(</span><span class='ivar'>@template</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_template'>template</span><span class='op'>|</span> |
|||
<span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span> <span class='ivar'>@binding</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:04 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> |
@ -0,0 +1,857 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Util::FormPart |
|||
|
|||
— 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::Util::FormPart"; |
|||
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 (F)</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="../Util.html" title="Hyde::Util (module)">Util</a></span></span> |
|||
» |
|||
<span class="title">FormPart</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::Util::FormPart |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Struct</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Struct</li> |
|||
|
|||
<li class="next">Hyde::Util::FormPart</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/util/multipart.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Valid element of form data with headers</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</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="#data-instance_method" title="#data (instance method)">#<strong>data</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
<span class="note title readonly">readonly</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Data received in the field through form data.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#filename-instance_method" title="#filename (instance method)">#<strong>filename</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
<span class="note title readonly">readonly</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Original name of the sent file.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#filetype-instance_method" title="#filetype (instance method)">#<strong>filetype</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
<span class="note title readonly">readonly</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>MIME-type of the file.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
<span class="note title readonly">readonly</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>name of the form part.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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="#file%3F-instance_method" title="#file? (instance method)">#<strong>file?</strong> ⇒ Boolean </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Is this form part a file or plain data?.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#headers=-instance_method" title="#headers= (instance method)">#<strong>headers</strong>(value) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>headers recevied from form data.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#simplify-instance_method" title="#simplify (instance method)">#<strong>simplify</strong> ⇒ FormPart, String </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>If FormPart is not a file, simplify to string.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#tempfile=-instance_method" title="#tempfile= (instance method)">#<strong>tempfile</strong>(value) ⇒ Object </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Temporary file for storing sent file data.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
<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="data-instance_method"> |
|||
|
|||
#<strong>data</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Data received in the field through form data</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
|
|||
<span id=""></span> |
|||
<div class="method_details "> |
|||
<h3 class="signature " id="filename-instance_method"> |
|||
|
|||
#<strong>filename</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Original name of the sent file</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
|
|||
<span id=""></span> |
|||
<div class="method_details "> |
|||
<h3 class="signature " id="filetype-instance_method"> |
|||
|
|||
#<strong>filetype</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>MIME-type of the file</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
|
|||
<span id=""></span> |
|||
<div class="method_details "> |
|||
<h3 class="signature " id="name-instance_method"> |
|||
|
|||
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>name of the form part</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</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="file?-instance_method"> |
|||
|
|||
#<strong>file?</strong> ⇒ <tt>Boolean</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Is this form part a file or plain data?</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>Boolean</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
21 |
|||
22 |
|||
23</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 21</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="headers=-instance_method"> |
|||
|
|||
#<strong>headers=</strong>(value) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>headers recevied from form data</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="simplify-instance_method"> |
|||
|
|||
#<strong>simplify</strong> ⇒ <tt><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></tt>, <tt>String</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>If FormPart is not a file, simplify to string.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></tt>, <tt>String</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
27 |
|||
28 |
|||
29</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 27</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="tempfile=-instance_method"> |
|||
|
|||
#<strong>tempfile=</strong>(value) ⇒ <tt>Object</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Temporary file for storing sent file data.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
17 |
|||
18 |
|||
19 |
|||
20 |
|||
21 |
|||
22 |
|||
23 |
|||
24 |
|||
25 |
|||
26 |
|||
27 |
|||
28 |
|||
29 |
|||
30</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 17</span> |
|||
|
|||
<span class='const'><span class='object_link'><a href="" title="Hyde::Util::FormPart (class)">FormPart</a></span></span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:filename</span><span class='comma'>,</span> |
|||
<span class='symbol'>:filetype</span><span class='comma'>,</span> <span class='symbol'>:tempfile</span><span class='comma'>,</span> <span class='symbol'>:headers</span><span class='rparen'>)</span> <span class='kw'>do</span> |
|||
<span class='comment'># Is this form part a file or plain data? |
|||
</span> <span class='comment'># @return [Boolean] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_file?'>file?</span> |
|||
<span class='op'>!</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> |
|||
<span class='kw'>end</span> |
|||
|
|||
<span class='comment'># If FormPart is not a file, simplify to string. |
|||
</span> <span class='comment'># @return [FormPart, String] |
|||
</span> <span class='kw'>def</span> <span class='id identifier rubyid_simplify'>simplify</span> |
|||
<span class='id identifier rubyid_file?'>file?</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:04 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> |
@ -0,0 +1,487 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Class: Hyde::Util::MultipartParser |
|||
|
|||
— 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::Util::MultipartParser"; |
|||
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 (M)</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="../Util.html" title="Hyde::Util (module)">Util</a></span></span> |
|||
» |
|||
<span class="title">MultipartParser</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::Util::MultipartParser |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
<dl> |
|||
<dt>Inherits:</dt> |
|||
<dd> |
|||
<span class="inheritName">Object</span> |
|||
|
|||
<ul class="fullTree"> |
|||
<li>Object</li> |
|||
|
|||
<li class="next">Hyde::Util::MultipartParser</li> |
|||
|
|||
</ul> |
|||
<a href="#" class="inheritanceTree">show all</a> |
|||
|
|||
</dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Includes:</dt> |
|||
<dd><span class='object_link'><a href="ParserCommon.html" title="Hyde::Util::ParserCommon (module)">ParserCommon</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/util/multipart.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>A very naive implementation of a Multipart form parser.</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(io, boundary) ⇒ MultipartParser </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
<span class="note title constructor">constructor</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>A new instance of MultipartParser.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#parse-instance_method" title="#parse (instance method)">#<strong>parse</strong> ⇒ Array<FormPart, FormFile> </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Parse multipart formdata.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
<li class="public "> |
|||
<span class="summary_signature"> |
|||
|
|||
<a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> ⇒ Hash </a> |
|||
|
|||
|
|||
|
|||
</span> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<span class="summary_desc"><div class='inline'><p>Return a hash of current form.</p> |
|||
</div></span> |
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<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>(io, boundary) ⇒ <tt><span class='object_link'><a href="" title="Hyde::Util::MultipartParser (class)">MultipartParser</a></span></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Returns a new instance of MultipartParser.</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
35 |
|||
36 |
|||
37 |
|||
38 |
|||
39 |
|||
40</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 35</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_boundary'>boundary</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@input</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_io'>io</span> |
|||
<span class='ivar'>@boundary</span> <span class='op'>=</span> <span class='id identifier rubyid_boundary'>boundary</span> |
|||
<span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:idle</span> |
|||
<span class='ivar'>@data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</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="parse-instance_method"> |
|||
|
|||
#<strong>parse</strong> ⇒ <tt>Array<<span class='object_link'><a href="FormPart.html" title="Hyde::Util::FormPart (class)">FormPart</a></span>, FormFile></tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Parse multipart formdata</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>Array<<span class='object_link'><a href="FormPart.html" title="Hyde::Util::FormPart (class)">FormPart</a></span>, FormFile></tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
48 |
|||
49 |
|||
50 |
|||
51 |
|||
52 |
|||
53 |
|||
54 |
|||
55 |
|||
56 |
|||
57 |
|||
58 |
|||
59 |
|||
60 |
|||
61 |
|||
62 |
|||
63 |
|||
64 |
|||
65 |
|||
66 |
|||
67 |
|||
68 |
|||
69 |
|||
70 |
|||
71 |
|||
72 |
|||
73 |
|||
74 |
|||
75 |
|||
76 |
|||
77 |
|||
78 |
|||
79 |
|||
80 |
|||
81 |
|||
82 |
|||
83 |
|||
84 |
|||
85 |
|||
86 |
|||
87 |
|||
88 |
|||
89 |
|||
90 |
|||
91 |
|||
92 |
|||
93 |
|||
94 |
|||
95 |
|||
96 |
|||
97 |
|||
98 |
|||
99 |
|||
100</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 48</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span> |
|||
<span class='kw'>return</span> <span class='ivar'>@data</span> <span class='kw'>unless</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> |
|||
|
|||
<span class='kw'>while</span> <span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='ivar'>@input</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='rparen'>)</span> |
|||
<span class='kw'>case</span> <span class='ivar'>@state</span> |
|||
<span class='kw'>when</span> <span class='symbol'>:idle</span> <span class='comment'># waiting for valid boundary |
|||
</span> <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='ivar'>@boundary</span><span class='embexpr_end'>}</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span> |
|||
<span class='comment'># transition to :headers on valid boundary |
|||
</span> <span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:headers</span> |
|||
<span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="FormPart.html" title="Hyde::Util::FormPart (class)">FormPart</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='kw'>nil</span><span class='rbracket'>]</span> <span class='op'>*</span> <span class='int'>5</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>when</span> <span class='symbol'>:headers</span> <span class='comment'># after valid boundary - checking for headers |
|||
</span> <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span> |
|||
<span class='comment'># prepare form field and transition to :data or :file |
|||
</span> <span class='ivar'>@state</span> <span class='op'>=</span> <span class='id identifier rubyid_file?'>file?</span><span class='lparen'>(</span><span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='symbol'>:file</span> <span class='op'>:</span> <span class='symbol'>:data</span> |
|||
<span class='kw'>if</span> <span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:data</span> |
|||
<span class='id identifier rubyid_setup_data_meta'>setup_data_meta</span><span class='lparen'>(</span><span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
|||
<span class='kw'>else</span> |
|||
<span class='id identifier rubyid_setup_file_meta'>setup_file_meta</span><span class='lparen'>(</span><span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>next</span> |
|||
<span class='kw'>end</span> |
|||
<span class='id identifier rubyid_push_header'>push_header</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span> |
|||
<span class='kw'>when</span> <span class='symbol'>:data</span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='comment'># after headers - processing form data |
|||
</span> <span class='kw'>if</span> <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> |
|||
<span class='comment'># transition to :idle on empty headers |
|||
</span> <span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:idle</span> |
|||
<span class='kw'>next</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='ivar'>@boundary</span><span class='embexpr_end'>}</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='ivar'>@boundary</span><span class='embexpr_end'>}</span><span class='tstring_content'>--\r\n</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_line'>line</span> |
|||
<span class='comment'># finalize and transition to either :headers or :idle |
|||
</span> <span class='kw'>if</span> <span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:file</span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_truncate'>truncate</span><span class='lparen'>(</span><span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='int'>2</span><span class='rparen'>)</span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tempfile'>tempfile</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> |
|||
<span class='kw'>else</span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_delete_suffix!'>delete_suffix!</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span> |
|||
<span class='kw'>end</span> |
|||
<span class='ivar'>@state</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='ivar'>@boundary</span><span class='embexpr_end'>}</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='symbol'>:headers</span> <span class='op'>:</span> <span class='symbol'>:idle</span> |
|||
<span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="FormPart.html" title="Hyde::Util::FormPart (class)">FormPart</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='kw'>nil</span><span class='rbracket'>]</span> <span class='op'>*</span> <span class='int'>5</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span> |
|||
<span class='kw'>next</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>if</span> <span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:data</span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span> <span class='op'><<</span> <span class='id identifier rubyid_line'>line</span> |
|||
<span class='kw'>else</span> |
|||
<span class='ivar'>@data</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tempfile'>tempfile</span> <span class='op'><<</span> <span class='id identifier rubyid_line'>line</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span> |
|||
<span class='kw'>end</span> |
|||
<span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:idle</span> |
|||
<span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span> |
|||
<span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div class="method_details "> |
|||
<h3 class="signature " id="to_h-instance_method"> |
|||
|
|||
#<strong>to_h</strong> ⇒ <tt>Hash</tt> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h3><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Return a hash of current form. |
|||
(equivalent to Query.parse but for multipart/form-data)</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
<p class="tag_title">Returns:</p> |
|||
<ul class="return"> |
|||
|
|||
<li> |
|||
|
|||
|
|||
<span class='type'>(<tt>Hash</tt>)</span> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
</ul> |
|||
|
|||
</div><table class="source_code"> |
|||
<tr> |
|||
<td> |
|||
<pre class="lines"> |
|||
|
|||
|
|||
106 |
|||
107 |
|||
108</pre> |
|||
</td> |
|||
<td> |
|||
<pre class="code"><span class="info file"># File 'lib/hyde/util/multipart.rb', line 106</span> |
|||
|
|||
<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> |
|||
<span class='id identifier rubyid_flatten'>flatten</span><span class='lparen'>(</span><span class='id identifier rubyid_sort'>sort</span><span class='lparen'>(</span><span class='id identifier rubyid_gen_hash'>gen_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_parse'>parse</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span> |
|||
<span class='kw'>end</span></pre> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:04 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> |
@ -0,0 +1,120 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title> |
|||
Module: Hyde::Util::ParserCommon |
|||
|
|||
— 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::Util::ParserCommon"; |
|||
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'><span class='object_link'><a href="../Util.html" title="Hyde::Util (module)">Util</a></span></span> |
|||
» |
|||
<span class="title">ParserCommon</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>Module: Hyde::Util::ParserCommon |
|||
|
|||
|
|||
|
|||
</h1> |
|||
<div class="box_info"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Included in:</dt> |
|||
<dd><span class='object_link'><a href="MultipartParser.html" title="Hyde::Util::MultipartParser (class)">MultipartParser</a></span>, <span class='object_link'><a href="Query.html" title="Hyde::Util::Query (class)">Query</a></span></dd> |
|||
</dl> |
|||
|
|||
|
|||
|
|||
<dl> |
|||
<dt>Defined in:</dt> |
|||
<dd>lib/hyde/util/sorting.rb</dd> |
|||
</dl> |
|||
|
|||
</div> |
|||
|
|||
<h2>Overview</h2><div class="docstring"> |
|||
<div class="discussion"> |
|||
<p>Internal library for generating form hashes</p> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<div class="tags"> |
|||
|
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
Generated on Wed Sep 13 02:08:01 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> |
2
doc/class_list.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,14 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") |
|||
require 'hyde' |
|||
require_relative 'external_methods' |
|||
|
|||
app = Hyde::Server.new do |
|||
get "/hello" do |
|||
header "content-type", "text/plain" |
|||
do_hello() |
|||
end |
|||
end |
|||
|
|||
run app |
@ -0,0 +1,12 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
module DSL |
|||
# Methods shared by probes, preprocessors and filters. |
|||
module CommonMethods |
|||
def do_hello() |
|||
"Hello world!" |
|||
end |
|||
end |
|||
end |
|||
end |
@ -0,0 +1 @@ |
|||
../../lib |
@ -0,0 +1 @@ |
|||
Example of extending base Hyde functionality with additional DSL methods. |
@ -0,0 +1 @@ |
|||
Example of handling forms in Hyde |
@ -0,0 +1,4 @@ |
|||
<footer> |
|||
<hr> |
|||
<p>Footer template part</p> |
|||
</footer> |
@ -0,0 +1,16 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") |
|||
require 'hyde' |
|||
|
|||
app = Hyde::Server.new do |
|||
remap ENV["PWD"] |
|||
get "/" do |
|||
header "content-type", "text/html" |
|||
localrand = rand |
|||
bind = binding |
|||
erb(file("index.rhtml"), toplevel: bind).run |
|||
end |
|||
end |
|||
|
|||
run app |
@ -0,0 +1,14 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title>Ruby template engine test</title> |
|||
</head> |
|||
<body> |
|||
<h1> |
|||
Welcome to another ugly looking test page |
|||
</h1> |
|||
<hr> |
|||
<p> This page exists only to test template engine functionality</p> |
|||
<p> Random value = <%= localrand %></p> |
|||
</body> |
|||
</html> |
@ -0,0 +1 @@ |
|||
../../lib |
@ -0,0 +1 @@ |
|||
This example demonstrates usage of template engines. |
@ -0,0 +1,78 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
# Shared DSL methods |
|||
module DSL |
|||
# Path (and subclasses) DSL constructors |
|||
module PathConstructors |
|||
# Append a Node child object to the list of children |
|||
def register(obj) |
|||
unless obj.is_a? Hyde::Node |
|||
raise StandardError, "register accepts node children only" |
|||
end |
|||
|
|||
@origin.children.append(obj) |
|||
end |
|||
|
|||
# Create a new {Hyde::Path} object |
|||
def path(path, &setup) |
|||
register(Hyde::Path.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::Probe} object |
|||
def probe(path, &_setup) |
|||
register(Hyde::Handlers::Probe.new(path, parent: @origin)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::GETHandler} object |
|||
def get(path, &setup) |
|||
register(Hyde::Handlers::GET.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# create a new {Hyde::Handlers::POSTHandler} object |
|||
def post(path, &setup) |
|||
register(Hyde::Handlers::POST.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::PUTHandler} object |
|||
def put(path, &setup) |
|||
register(Hyde::Handlers::PUT.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::HEADHandler} object |
|||
def head(path, &setup) |
|||
register(Hyde::Handlers::HEAD.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::DELETEHandler} object |
|||
def delete(path, &setup) |
|||
register(Hyde::Handlers::DELETE.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::CONNECTHandler} object |
|||
def connect(path, &setup) |
|||
register(Hyde::Handlers::CONNECT.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::TRACEHandler} object |
|||
def trace(path, &setup) |
|||
register(Hyde::Handlers::TRACE.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::PATCHHandler} object |
|||
def patch(path, &setup) |
|||
register(Hyde::Handlers::PATCH.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::OPTIONSHandler} object |
|||
def options(path, &setup) |
|||
register(Hyde::Handlers::OPTIONS.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Handlers::GETHandler} that serves static files |
|||
def serve(path) |
|||
register(Hyde::Handlers::Serve.new(path, parent: @origin)) |
|||
end |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,14 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
module DSL |
|||
# Probe (and subclasses) DSL construct |
|||
module ProbeConstructors |
|||
# Create a new erb template |
|||
# @see Hyde::Template#new |
|||
def erb(input, toplevel: nil, locals: nil) |
|||
Hyde::Templates::ERB.new(input, toplevel: toplevel, locals: locals) |
|||
end |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,9 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
module DSL |
|||
module TemplateMethods |
|||
|
|||
end |
|||
end |
|||
end |
@ -1,80 +0,0 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
# Shared DSL methods |
|||
module DSL |
|||
# Path (and subclasses) DSL constructors |
|||
module PathConstructors |
|||
# Append a Node child object to the list of children |
|||
def register(obj) |
|||
unless obj.is_a? Hyde::Node |
|||
raise StandardError, "register accepts node children only" |
|||
end |
|||
|
|||
@origin.children.append(obj) |
|||
end |
|||
|
|||
# Create a new {Hyde::Path} object |
|||
def path(path, &setup) |
|||
# i don't know WHAT is wrong with this thing. it just is wrong. |
|||
# @sg-ignore |
|||
register(Hyde::Path.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::Probe} object |
|||
def probe(path, &_setup) |
|||
register(Hyde::Probe.new(path, parent: @origin)) |
|||
end |
|||
|
|||
# Create a new {Hyde::GETHandler} object |
|||
def get(path, &setup) |
|||
register(Hyde::GETHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# create a new {Hyde::POSTHandler} object |
|||
def post(path, &setup) |
|||
register(Hyde::POSTHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::PUTHandler} object |
|||
def put(path, &setup) |
|||
register(Hyde::PUTHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::HEADHandler} object |
|||
def head(path, &setup) |
|||
register(Hyde::HEADHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::DELETEHandler} object |
|||
def delete(path, &setup) |
|||
register(Hyde::DELETEHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::CONNECTHandler} object |
|||
def connect(path, &setup) |
|||
register(Hyde::CONNECTHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::TRACEHandler} object |
|||
def trace(path, &setup) |
|||
register(Hyde::TRACEHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::PATCHHandler} object |
|||
def patch(path, &setup) |
|||
register(Hyde::PATCHHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::OPTIONSHandler} object |
|||
def options(path, &setup) |
|||
register(Hyde::OPTIONSHandler.new(path, parent: @origin, &setup)) |
|||
end |
|||
|
|||
# Create a new {Hyde::GETHandler} that serves static files |
|||
def serve(path) |
|||
register(Hyde::ServeHandler.new(path, parent: @origin)) |
|||
end |
|||
end |
|||
end |
|||
end |
@ -1,52 +1,56 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
module Hyde |
|||
# Probe that executes a callback on request |
|||
class Handler < Hyde::Probe |
|||
# @param path [Object] |
|||
# @param parent [Hyde::Node] |
|||
# @param exec [#call] |
|||
def initialize(path, parent:, &exec) |
|||
super(path, parent: parent) |
|||
@callback = exec |
|||
@binding = Hyde::ProbeBinding.new(self) |
|||
@response = nil |
|||
end |
|||
|
|||
attr_accessor :response |
|||
attr_reader :request |
|||
require_relative "../probe" |
|||
|
|||
# Method callback on successful request navigation. |
|||
# Runs block supplied with object initialization. |
|||
# Request's #splat and #param are passed to block. |
|||
# |
|||
# Callback's returned should be one of viable responses: |
|||
# |
|||
# - {Hyde::Response} object |
|||
# - An array that matches Rack return form |
|||
# - An array that matches old (Rack 2.x) return form |
|||
# - A string (returned as HTML with code 200) |
|||
# - false (bounces the request to next handler) |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if further navigation is possible |
|||
# @raise [UncaughtThrowError] may raise if die() is called. |
|||
def process(request) |
|||
@response = nil |
|||
return reject(request) unless request.path.match?(/^\/?$/) |
|||
|
|||
@request = request |
|||
response = catch(:break) do |
|||
@binding.instance_exec(*request.splat, |
|||
**request.param, |
|||
&@callback) |
|||
module Hyde |
|||
module Handlers |
|||
# Probe that executes a callback on request |
|||
class Handler < Hyde::Probe |
|||
# @param path [Object] |
|||
# @param parent [Hyde::Node] |
|||
# @param exec [#call] |
|||
def initialize(path, parent:, &exec) |
|||
super(path, parent: parent) |
|||
@callback = exec |
|||
@context = Hyde::ProbeContext.new(self) |
|||
@response = nil |
|||
end |
|||
return false unless response |
|||
|
|||
if @response and [String, File, IO].include? response.class |
|||
@response.body = response |
|||
throw :finish, @response |
|||
|
|||
attr_accessor :response |
|||
attr_reader :request |
|||
|
|||
# Method callback on successful request navigation. |
|||
# Runs block supplied with object initialization. |
|||
# Request's #splat and #param are passed to block. |
|||
# |
|||
# Callback's returned should be one of viable responses: |
|||
# |
|||
# - {Hyde::Response} object |
|||
# - An array that matches Rack return form |
|||
# - An array that matches old (Rack 2.x) return form |
|||
# - A string (returned as HTML with code 200) |
|||
# - false (bounces the request to next handler) |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if further navigation is possible |
|||
# @raise [UncaughtThrowError] may raise if die() is called. |
|||
def process(request) |
|||
@response = nil |
|||
return reject(request) unless request.path.match?(/^\/?$/) |
|||
|
|||
@request = request |
|||
response = catch(:break) do |
|||
@context.instance_exec(*request.splat, |
|||
**request.param, |
|||
&@callback) |
|||
end |
|||
return false unless response |
|||
|
|||
if @response and [String, File, IO].include? response.class |
|||
@response.body = response |
|||
throw :finish, @response |
|||
end |
|||
throw :finish, response |
|||
end |
|||
throw :finish, response |
|||
end |
|||
end |
|||
end |
@ -1,70 +1,74 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
require_relative "../probe" |
|||
|
|||
module Hyde |
|||
# Probe that executes callback on a GET |
|||
class GETHandler < Hyde::Handler |
|||
METHOD = "GET" |
|||
module Handlers |
|||
# Probe that executes callback on a GET |
|||
class GET < Hyde::Handlers::Handler |
|||
METHOD = "GET" |
|||
|
|||
# Method callback on successful request navigation. |
|||
# Runs block supplied with object initialization. |
|||
# Request's #splat and #param are passed to block. |
|||
# |
|||
# Callback's returned should be one of viable responses: |
|||
# |
|||
# - {Hyde::Response} object |
|||
# - An array that matches Rack return form |
|||
# - An array that matches old (Rack 2.x) return form |
|||
# - A string (returned as HTML with code 200) |
|||
# - false (bounces the request to next handler) |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if further navigation is possible |
|||
# @raise [UncaughtThrowError] may raise if die() is called. |
|||
def process(request) |
|||
unless request.request_method.casecmp(self.class::METHOD).zero? |
|||
return false |
|||
end |
|||
# Method callback on successful request navigation. |
|||
# Runs block supplied with object initialization. |
|||
# Request's #splat and #param are passed to block. |
|||
# |
|||
# Callback's returned should be one of viable responses: |
|||
# |
|||
# - {Hyde::Response} object |
|||
# - An array that matches Rack return form |
|||
# - An array that matches old (Rack 2.x) return form |
|||
# - A string (returned as HTML with code 200) |
|||
# - false (bounces the request to next handler) |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if further navigation is possible |
|||
# @raise [UncaughtThrowError] may raise if die() is called. |
|||
def process(request) |
|||
unless request.request_method.casecmp(self.class::METHOD).zero? |
|||
return false |
|||
end |
|||
|
|||
super(request) |
|||
super(request) |
|||
end |
|||
end |
|||
end |
|||
|
|||
# Probe that executes callback on a POST |
|||
class POSTHandler < GETHandler |
|||
METHOD = "POST" |
|||
end |
|||
# Probe that executes callback on a POST |
|||
class POST < GET |
|||
METHOD = "POST" |
|||
end |
|||
|
|||
# Probe that executes callback on a HEAD |
|||
class HEADHandler < GETHandler |
|||
METHOD = "HEAD" |
|||
end |
|||
# Probe that executes callback on a HEAD |
|||
class HEAD < GET |
|||
METHOD = "HEAD" |
|||
end |
|||
|
|||
# Probe that executes callback on a PUT |
|||
class PUTHandler < GETHandler |
|||
METHOD = "PUT" |
|||
end |
|||
# Probe that executes callback on a PUT |
|||
class PUT < GET |
|||
METHOD = "PUT" |
|||
end |
|||
|
|||
# Probe that executes callback on a DELETE |
|||
class DELETEHandler < GETHandler |
|||
METHOD = "DELETE" |
|||
end |
|||
# Probe that executes callback on a DELETE |
|||
class DELETE < GET |
|||
METHOD = "DELETE" |
|||
end |
|||
|
|||
# Probe that executes callback on a CONNECT |
|||
class CONNECTHandler < GETHandler |
|||
METHOD = "CONNECT" |
|||
end |
|||
# Probe that executes callback on a CONNECT |
|||
class CONNECT < GET |
|||
METHOD = "CONNECT" |
|||
end |
|||
|
|||
# Probe that executes callback on a OPTIONS |
|||
class OPTIONSHandler < GETHandler |
|||
METHOD = "OPTIONS" |
|||
end |
|||
# Probe that executes callback on a OPTIONS |
|||
class OPTIONS < GET |
|||
METHOD = "OPTIONS" |
|||
end |
|||
|
|||
# Probe that executes callback on a TRACE |
|||
class TRACEHandler < GETHandler |
|||
METHOD = "TRACE" |
|||
end |
|||
# Probe that executes callback on a TRACE |
|||
class TRACE < GET |
|||
METHOD = "TRACE" |
|||
end |
|||
|
|||
# Probe that executes callback on a PATCH |
|||
class PATCHHandler < GETHandler |
|||
METHOD = "PATCH" |
|||
# Probe that executes callback on a PATCH |
|||
class PATCH < GET |
|||
METHOD = "PATCH" |
|||
end |
|||
end |
|||
end |
@ -1,28 +1,32 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
require_relative "../probe" |
|||
|
|||
module Hyde |
|||
# Probe that sends files from a location |
|||
class ServeHandler < Hyde::Probe |
|||
# @param path [Object] |
|||
# @param parent [Hyde::Node] |
|||
# @param exec [#call] |
|||
def initialize(path, parent:) |
|||
super(path, parent: parent) |
|||
end |
|||
module Handlers |
|||
# Probe that sends files from a location |
|||
class Serve < Hyde::Probe |
|||
# @param path [Object] |
|||
# @param parent [Hyde::Node] |
|||
# @param exec [#call] |
|||
def initialize(path, parent:) |
|||
super(path, parent: parent) |
|||
end |
|||
|
|||
attr_accessor :response |
|||
attr_accessor :response |
|||
|
|||
# Method callback on successful request navigation. |
|||
# Tries to serve files matched by handler |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if file was found |
|||
def process(request) |
|||
path = File.expand_path(request.filepath) |
|||
return unless path.start_with? @properties["path"] |
|||
# Method callback on successful request navigation. |
|||
# Tries to serve files matched by handler |
|||
# @param request [Hyde::Request] |
|||
# @return [Boolean] true if file was found |
|||
def process(request) |
|||
path = File.expand_path(request.filepath) |
|||
return unless path.start_with? @properties["path"] |
|||
|
|||
File.open(path.delete_suffix("/")) |
|||
rescue StandardError |
|||
false |
|||
File.open(path.delete_suffix("/")) |
|||
rescue StandardError |
|||
false |
|||
end |
|||
end |
|||
end |
|||
end |
@ -1,30 +1,76 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
require_relative 'dsl/constructors_probe' |
|||
require_relative 'dsl/methods_common' |
|||
require_relative 'dsl/methods_probe' |
|||
|
|||
module Hyde |
|||
# Adapter class for template engines |
|||
# @abstract This class does not actually do anything template related. |
|||
# All template engine adapters subclassed from Template |
|||
module Templates |
|||
autoload :ERB, "hyde/template/erb" |
|||
end |
|||
|
|||
# Context for template engines |
|||
class TemplateContext |
|||
include Hyde::DSL::CommonMethods |
|||
include Hyde::DSL::ProbeMethods |
|||
include Hyde::DSL::ProbeConstructors |
|||
|
|||
def initialize(parent) |
|||
@origin = parent |
|||
end |
|||
end |
|||
|
|||
# Interface for Template engines |
|||
# @abstract does not represent any actual template engine. |
|||
class Template |
|||
# @param filename [String] |
|||
# @param input [String, File] |
|||
# @param context [Binding, nil] |
|||
# @param locals [Hash{Symbol => Object}, nil] |
|||
def initialize(filename, context: nil, locals: nil) |
|||
@data = File.read(filename) |
|||
@context = context or binding |
|||
@locals.each do |k, v| |
|||
@context.local_variable_set(k, v) |
|||
# @param locals [Hash, nil] |
|||
def initialize(input, toplevel: nil, locals: nil) |
|||
@template = input.is_a?(File) ? input.read : input |
|||
input.close if input.is_a? File |
|||
@binding = toplevel or binding |
|||
locals&.each do |k, v| |
|||
@binding.local_variable_set(k,v) |
|||
end |
|||
@context = TemplateContext.new(self) |
|||
end |
|||
|
|||
# Prepare template before rendering. |
|||
# (This method is an interface stub) |
|||
def prepare |
|||
@template = nil # your template generator goes here |
|||
# Set local variable |
|||
# @param key [Symbol] |
|||
# @param value [Object] |
|||
def local_variable_set(key, value) |
|||
@binding.local_variable_set(key, value) |
|||
end |
|||
|
|||
# Render template |
|||
# (This method is an interface stub) |
|||
def render |
|||
(@template ||= prepare).render(@context) |
|||
# Get local variable |
|||
# @param key [Symbol] |
|||
# @return [Object] |
|||
def local_variable_get(key) |
|||
@binding.local_variable_get(key) |
|||
end |
|||
|
|||
# Get an array of defined local variables |
|||
# @return [Array(Symbol)] |
|||
def local_variables |
|||
@binding.local_variables |
|||
end |
|||
|
|||
# Override binding variables. |
|||
# @param vars [Hash{Symbol => Object}] |
|||
def override_locals(vars) |
|||
vars.each do |k, v| |
|||
@binding.local_variable_set(k, v) |
|||
end |
|||
end |
|||
|
|||
# Run the template |
|||
# @note This method is a stub. |
|||
def run |
|||
# ... (stub) |
|||
end |
|||
|
|||
attr_accessor :binding |
|||
end |
|||
end |
@ -0,0 +1,25 @@ |
|||
# frozen_string_literal: true |
|||
|
|||
require 'erb' |
|||
require_relative '../template' |
|||
|
|||
module Hyde |
|||
module Templates |
|||
# ERB Template language adapter |
|||
class ERB < Hyde::Template |
|||
# @see Hyde::Template#new |
|||
def initialize(input, toplevel: nil, locals: nil) |
|||
super |
|||
@template = ::ERB.new(@template) |
|||
@template.filename = input.is_a?(File) ? input.path : "(Inline)" |
|||
end |
|||
|
|||
# Run the template. |
|||
def run |
|||
@context.instance_exec(@template,@binding) do |template, binding| |
|||
template.result binding |
|||
end |
|||
end |
|||
end |
|||
end |
|||
end |
Write
Preview
Loading…
Cancel
Save
Reference in new issue