|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8"> |
| 5 | +<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | +<title> |
| 7 | + Module: SnakyHash |
| 8 | + |
| 9 | + — Documentation by YARD 0.9.44 |
| 10 | + |
| 11 | +</title> |
| 12 | + |
| 13 | + <link rel="stylesheet" href="css/style.css" type="text/css"> |
| 14 | + |
| 15 | + <link rel="stylesheet" href="css/common.css" type="text/css"> |
| 16 | + |
| 17 | +<script type="text/javascript"> |
| 18 | + pathId = "SnakyHash"; |
| 19 | + relpath = ''; |
| 20 | +</script> |
| 21 | + |
| 22 | + |
| 23 | + <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> |
| 24 | + |
| 25 | + <script type="text/javascript" charset="utf-8" src="js/app.js"></script> |
| 26 | + |
| 27 | + |
| 28 | + </head> |
| 29 | + <body> |
| 30 | + <div id="main_progress" aria-hidden="true"></div> |
| 31 | + |
| 32 | + <div class="nav_wrap"> |
| 33 | + <iframe id="nav" src="class_list.html?1"></iframe> |
| 34 | + <div id="resizer"></div> |
| 35 | + </div> |
| 36 | + |
| 37 | + <div id="main" tabindex="-1"> |
| 38 | + <div id="header"> |
| 39 | + <div id="menu"> |
| 40 | + |
| 41 | + <a href="_index.html">Index (S)</a> » |
| 42 | + |
| 43 | + |
| 44 | + <span class="title">SnakyHash</span> |
| 45 | + |
| 46 | +</div> |
| 47 | + |
| 48 | + <div id="search"> |
| 49 | + |
| 50 | + <a class="full_list_link" id="class_list_link" |
| 51 | + href="class_list.html"> |
| 52 | + |
| 53 | + <svg width="24" height="24"> |
| 54 | + <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> |
| 55 | + <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> |
| 56 | + <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> |
| 57 | + </svg> |
| 58 | + </a> |
| 59 | + |
| 60 | +</div> |
| 61 | + <div class="clear"></div> |
| 62 | + </div> |
| 63 | + |
| 64 | + <div id="content"><h1>Module: SnakyHash |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +</h1> |
| 69 | +<div class="box_info"> |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + <dl> |
| 82 | + <dt>Defined in:</dt> |
| 83 | + <dd>lib/snaky_hash.rb<span class="defines">,<br> |
| 84 | + lib/snaky_hash/snake.rb,<br> lib/snaky_hash/version.rb,<br> lib/snaky_hash/extensions.rb,<br> lib/snaky_hash/serializer.rb,<br> lib/snaky_hash/string_keyed.rb,<br> lib/snaky_hash/symbol_keyed.rb</span> |
| 85 | + |
| 86 | +</dd> |
| 87 | + </dl> |
| 88 | + |
| 89 | +</div> |
| 90 | + |
| 91 | +<h2>Overview</h2><div class="docstring"> |
| 92 | + <div class="discussion"> |
| 93 | + <p>This is a module-class hybrid.</p> |
| 94 | + |
| 95 | +<p>A flexible key conversion system that supports both String and Symbol keys,<br /> |
| 96 | +with optional serialization capabilities.</p> |
| 97 | + |
| 98 | +<p>Hashie’s standard SymbolizeKeys is similar to the functionality we want.<br /> |
| 99 | +… but not quite. We need to support both String (for oauth2) and Symbol keys (for oauth).<br /> |
| 100 | +see: Hashie::Extensions::Mash::SymbolizeKeys</p> |
| 101 | + |
| 102 | + |
| 103 | + </div> |
| 104 | +</div> |
| 105 | +<div class="tags"> |
| 106 | + |
| 107 | + <div class="examples"> |
| 108 | + <h4 class="tag_title">Examples:</h4> |
| 109 | + |
| 110 | + |
| 111 | + <h5 class="example_title"><div class='inline'><p>Basic usage with string keys</p> |
| 112 | +</div></h5> |
| 113 | + |
| 114 | + <pre class="example code"><code><span class='kw'>class</span> <span class='const'>MyHash</span> <span class='op'><</span> <span class='const'>Hashie</span><span class='op'>::</span><span class='const'>Mash</span> |
| 115 | + <span class='id identifier rubyid_include'>include</span> <span class='const'>SnakyHash</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SnakyHash/Snake.html" title="SnakyHash::Snake (class)">Snake</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="SnakyHash/Snake.html#initialize-instance_method" title="SnakyHash::Snake#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>key_type:</span> <span class='symbol'>:string</span><span class='rparen'>)</span> |
| 116 | +<span class='kw'>end</span></code></pre> |
| 117 | + |
| 118 | + |
| 119 | + <h5 class="example_title"><div class='inline'><p>Usage with symbol keys and serialization</p> |
| 120 | +</div></h5> |
| 121 | + |
| 122 | + <pre class="example code"><code><span class='kw'>class</span> <span class='const'>MySerializableHash</span> <span class='op'><</span> <span class='const'>Hashie</span><span class='op'>::</span><span class='const'>Mash</span> |
| 123 | + <span class='id identifier rubyid_include'>include</span> <span class='const'>SnakyHash</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SnakyHash/Snake.html" title="SnakyHash::Snake (class)">Snake</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="SnakyHash/Snake.html#initialize-instance_method" title="SnakyHash::Snake#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>key_type:</span> <span class='symbol'>:symbol</span><span class='comma'>,</span> <span class='label'>serializer:</span> <span class='kw'>true</span><span class='rparen'>)</span> |
| 124 | +<span class='kw'>end</span></code></pre> |
| 125 | + |
| 126 | + </div> |
| 127 | + |
| 128 | + |
| 129 | +</div><h2>Defined Under Namespace</h2> |
| 130 | +<p class="children"> |
| 131 | + |
| 132 | + |
| 133 | + <strong class="modules">Modules:</strong> <span class='object_link'><a href="SnakyHash/Serializer.html" title="SnakyHash::Serializer (module)">Serializer</a></span>, <span class='object_link'><a href="SnakyHash/Version.html" title="SnakyHash::Version (module)">Version</a></span> |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + <strong class="classes">Classes:</strong> <span class='object_link'><a href="SnakyHash/Error.html" title="SnakyHash::Error (class)">Error</a></span>, <span class='object_link'><a href="SnakyHash/Extensions.html" title="SnakyHash::Extensions (class)">Extensions</a></span>, <span class='object_link'><a href="SnakyHash/Snake.html" title="SnakyHash::Snake (class)">Snake</a></span>, <span class='object_link'><a href="SnakyHash/StringKeyed.html" title="SnakyHash::StringKeyed (class)">StringKeyed</a></span>, <span class='object_link'><a href="SnakyHash/SymbolKeyed.html" title="SnakyHash::SymbolKeyed (class)">SymbolKeyed</a></span> |
| 138 | + |
| 139 | + |
| 140 | +</p> |
| 141 | + |
| 142 | + |
| 143 | + <h2> |
| 144 | + Constant Summary |
| 145 | + <small><a href="#" class="constants_summary_toggle">collapse</a></small> |
| 146 | + </h2> |
| 147 | + |
| 148 | + <dl class="constants"> |
| 149 | + |
| 150 | + <dt id="VERSION-constant" class="">VERSION = |
| 151 | + <div class="docstring"> |
| 152 | + <div class="discussion"> |
| 153 | + <p>Traditional Constant Location</p> |
| 154 | + |
| 155 | + |
| 156 | + </div> |
| 157 | +</div> |
| 158 | +<div class="tags"> |
| 159 | + |
| 160 | + |
| 161 | +</div> |
| 162 | + </dt> |
| 163 | + <dd><pre class="code"><span class='const'><span class='object_link'><a href="SnakyHash/Version.html" title="SnakyHash::Version (module)">Version</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SnakyHash/Version.html#VERSION-constant" title="SnakyHash::Version::VERSION (constant)">VERSION</a></span></span></pre></dd> |
| 164 | + |
| 165 | + </dl> |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | +</div> |
| 177 | + |
| 178 | + <div id="footer"> |
| 179 | + Generated on Sun Jun 7 00:08:23 2026 by |
| 180 | + <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 181 | + 0.9.44 (ruby-4.0.5). |
| 182 | +</div> |
| 183 | + |
| 184 | + </div> |
| 185 | + </body> |
| 186 | +</html> |
0 commit comments