doc/AeEasy/Test/Helper.html in ae_easy-test-0.0.2 vs doc/AeEasy/Test/Helper.html in ae_easy-test-0.0.3
- old
+ new
@@ -1,505 +1,505 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: AeEasy::Test::Helper
-
- — Documentation by YARD 0.9.18
-
-</title>
-
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
-
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
-
-<script type="text/javascript" charset="utf-8">
- pathId = "AeEasy::Test::Helper";
- 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="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span> » <span class='title'><span class='object_link'><a href="../Test.html" title="AeEasy::Test (module)">Test</a></span></span>
- »
- <span class="title">Helper</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: AeEasy::Test::Helper
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/ae_easy/test/helper.rb</dd>
- </dl>
-
-</div>
-
-
-
-
-
-
-
-
-
- <h2>
- Class Method Summary
- <small><a href="#" class="summary_toggle">collapse</a></small>
- </h2>
-
- <ul class="summary">
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#collection_diff-class_method" title="collection_diff (class method)">.<strong>collection_diff</strong>(items_a, items_b, opts = {}) ⇒ Hash </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Module: AeEasy::Test::Helper
+
+ — Documentation by YARD 0.9.19
+
+</title>
+
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
+
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
+
+<script type="text/javascript" charset="utf-8">
+ pathId = "AeEasy::Test::Helper";
+ 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="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span> » <span class='title'><span class='object_link'><a href="../Test.html" title="AeEasy::Test (module)">Test</a></span></span>
+ »
+ <span class="title">Helper</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: AeEasy::Test::Helper
+
+
+
+</h1>
+<div class="box_info">
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/ae_easy/test/helper.rb</dd>
+ </dl>
+
+</div>
+
+
+
+
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small><a href="#" class="summary_toggle">collapse</a></small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#collection_diff-class_method" title="collection_diff (class method)">.<strong>collection_diff</strong>(items_a, items_b, opts = {}) ⇒ Hash </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Generate a diff over 2 collections.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#collection_match%3F-class_method" title="collection_match? (class method)">.<strong>collection_match?</strong>(fragment, universe, opts = {}) ⇒ Boolean </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#collection_match%3F-class_method" title="collection_match? (class method)">.<strong>collection_match?</strong>(fragment, universe, opts = {}) ⇒ Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Validate when an item collection match universe item collection.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#delete_keys_from!-class_method" title="delete_keys_from! (class method)">.<strong>delete_keys_from!</strong>(hash, keys) ⇒ Hash </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#delete_keys_from!-class_method" title="delete_keys_from! (class method)">.<strong>delete_keys_from!</strong>(hash, keys) ⇒ Hash </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Delete keys from a hash.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#load_file-class_method" title="load_file (class method)">.<strong>load_file</strong>(file_path, should_exists = false) ⇒ String<sup>?</sup> </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#load_file-class_method" title="load_file (class method)">.<strong>load_file</strong>(file_path, should_exists = false) ⇒ String<sup>?</sup> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Load and return file contents when exists.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#load_json_file-class_method" title="load_json_file (class method)">.<strong>load_json_file</strong>(file_path, should_exists = false) ⇒ Hash<sup>?</sup> </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#load_json_file-class_method" title="load_json_file (class method)">.<strong>load_json_file</strong>(file_path, should_exists = false) ⇒ Hash<sup>?</sup> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Load and return file contents as json when exists.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#match%3F-class_method" title="match? (class method)">.<strong>match?</strong>(element, filter, opts = {}) ⇒ Boolean </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#match%3F-class_method" title="match? (class method)">.<strong>match?</strong>(element, filter, opts = {}) ⇒ Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Check if an hash element match the filter.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#match_collections-class_method" title="match_collections (class method)">.<strong>match_collections</strong>(items_a, items_b, opts = {}) ⇒ Hash </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#match_collections-class_method" title="match_collections (class method)">.<strong>match_collections</strong>(items_a, items_b, opts = {}) ⇒ Hash </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Match two collections and calculate diff.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#sanitize-class_method" title="sanitize (class method)">.<strong>sanitize</strong>(raw_hash, opts) ⇒ Hash </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#sanitize-class_method" title="sanitize (class method)">.<strong>sanitize</strong>(raw_hash, opts) ⇒ Hash </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
<span class="summary_desc"><div class='inline'>
<p>Sanitize a copy of the hash provided.</p>
-</div></span>
-
-</li>
-
-
- </ul>
-
-
-
-
- <div id="class_method_details" class="method_details_list">
- <h2>Class Method Details</h2>
-
-
- <div class="method_details first">
- <h3 class="signature first" id="collection_diff-class_method">
-
- .<strong>collection_diff</strong>(items_a, items_b, opts = {}) ⇒ <tt>Hash</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="collection_diff-class_method">
+
+ .<strong>collection_diff</strong>(items_a, items_b, opts = {}) ⇒ <tt>Hash</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Generate a diff over 2 collections.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>items_a</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>items_a</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>List of items to diff.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>items_b</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>items_b</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>List of items to diff.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>{}</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>opts</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
+
+
+ —
<div class='inline'>
<p>({}) Configuration options.</p>
-</div>
-
- </li>
-
-</ul>
-
-
-
-
-
-
-
-
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
- <ul class="option">
-
- <li>
- <span class="name">:exact_match</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+</ul>
+
+
+
+
+
+
+
+
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
+ <ul class="option">
+
+ <li>
+ <span class="name">:exact_match</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Fragmenent should match element exactly.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:deep_stringify</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:deep_stringify</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ </span>
+
— <div class='inline'>
<p>If `true` then stringify all hash keys including sublevels before matching.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:sanitize</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:sanitize</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Sanitize element and filters when `true`.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:skip_keys</span>
- <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
- <span class="default">
-
- — default:
- <tt>nil</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:skip_keys</span>
+ <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>nil</tt>
+
+ </span>
+
— <div class='inline'>
<p>Keys to skip on match.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:compare_way</span>
- <span class="type">(<tt>Symbol</tt>)</span>
- <span class="default">
-
- — default:
- <tt>:both</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:compare_way</span>
+ <span class="type">(<tt>Symbol</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>:both</tt>
+
+ </span>
+
— <div class='inline'>
<p>Comparison way sense:</p>
<ul><li>
<p>`:both` Compare left and right.</p>
</li><li>
<p>`:right` Compare if `items_a` are inside `items_b`.</p>
</li><li>
<p>`:left` Compare if `items_b` are inside `items_a`.</p>
</li></ul>
-</div>
-
- </li>
-
- </ul>
-
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ </ul>
+
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Diff results as follows:</p>
<ul><li>
<p>`[Array] :items_a` Diff items on `items_a` collection.</p>
</li><li>
<p>`[Array] :items_b` Diff items on `items_b` collection.</p>
</li><li>
<p>`[Boolean] :match` `true` when all items match else `false`.</p>
</li></ul>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
121
122
@@ -537,13 +537,13 @@
154
155
156
157
158
-159</pre>
- </td>
- <td>
+159</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 121</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_collection_diff'>collection_diff</span> <span class='id identifier rubyid_items_a'>items_a</span><span class='comma'>,</span> <span class='id identifier rubyid_items_b'>items_b</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='comment'># TODO: Improve this function
</span> <span class='comment'>#raise NotImplementedError.new('Current status WIP, don\'t use it for now.')
@@ -580,219 +580,219 @@
</span> <span class='lbrace'>{</span>
<span class='label'>items_a:</span> <span class='id identifier rubyid_not_found'>not_found</span><span class='comma'>,</span>
<span class='label'>items_b:</span> <span class='id identifier rubyid_remaining_items'>remaining_items</span><span class='comma'>,</span>
<span class='label'>match:</span> <span class='lparen'>(</span><span class='id identifier rubyid_not_found'>not_found</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id identifier rubyid_remaining_items'>remaining_items</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span><span class='rparen'>)</span>
<span class='rbrace'>}</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="collection_match?-class_method">
-
- .<strong>collection_match?</strong>(fragment, universe, opts = {}) ⇒ <tt>Boolean</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="collection_match?-class_method">
+
+ .<strong>collection_match?</strong>(fragment, universe, opts = {}) ⇒ <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Validate when an item collection match universe item collection.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>fragment</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>fragment</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Fragment of universe items to match.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>universe</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>universe</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>List of items.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>{}</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>opts</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
+
+
+ —
<div class='inline'>
<p>({}) Configuration options.</p>
-</div>
-
- </li>
-
-</ul>
-
-
-
-
-
-
-
-
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
- <ul class="option">
-
- <li>
- <span class="name">:exact_match</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+</ul>
+
+
+
+
+
+
+
+
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
+ <ul class="option">
+
+ <li>
+ <span class="name">:exact_match</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Fragmenent should match element exactly.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:same_count</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:same_count</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Fragment item count should match universe item count exactly.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:deep_stringify</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:deep_stringify</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ </span>
+
— <div class='inline'>
<p>If `true` then stringify all hash keys including sublevels before matching.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:sanitize</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:sanitize</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Sanitize element and filters when `true`.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:skip_keys</span>
- <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
- <span class="default">
-
- — default:
- <tt>nil</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:skip_keys</span>
+ <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>nil</tt>
+
+ </span>
+
— <div class='inline'>
<p>Keys to skip on match.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:compare_way</span>
- <span class="type">(<tt>Symbol</tt>)</span>
- <span class="default">
-
- — default:
- <tt>:both</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:compare_way</span>
+ <span class="type">(<tt>Symbol</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>:both</tt>
+
+ </span>
+
— <div class='inline'>
<p>Comparison way sense:</p>
<ul><li>
<p>`:both` Compare left and right.</p>
</li><li>
<p>`:right` Compare if `items_a` are inside `items_b`.</p>
</li><li>
<p>`:left` Compare if `items_b` are inside `items_a`.</p>
</li></ul>
-</div>
-
- </li>
-
- </ul>
-
-
-<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>
+</div>
+
+ </li>
+
+ </ul>
+
+
+<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">
181
182
@@ -808,13 +808,13 @@
192
193
194
195
196
-197</pre>
- </td>
- <td>
+197</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 181</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_collection_match?'>collection_match?</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='comma'>,</span> <span class='id identifier rubyid_universe'>universe</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='label'>exact_match:</span> <span class='kw'>true</span><span class='comma'>,</span>
@@ -829,479 +829,479 @@
</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:match_quantity</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>!=</span> <span class='id identifier rubyid_universe'>universe</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
<span class='id identifier rubyid_diff'>diff</span> <span class='op'>=</span> <span class='id identifier rubyid_collection_diff'>collection_diff</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='comma'>,</span> <span class='id identifier rubyid_universe'>universe</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span>
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:items_a</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:items_b</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span>
<span class='id identifier rubyid_match'>match</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="delete_keys_from!-class_method">
-
- .<strong>delete_keys_from!</strong>(hash, keys) ⇒ <tt>Hash</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="delete_keys_from!-class_method">
+
+ .<strong>delete_keys_from!</strong>(hash, keys) ⇒ <tt>Hash</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Delete keys from a hash.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>hash</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>hash</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Base hash to exclude from.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>keys</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>keys</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Keys to exclude.</p>
-</div>
-
- </li>
-
-</ul>
-
-<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>
+</div>
+
+ </li>
+
+</ul>
+
+<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">
33
34
35
36
-37</pre>
- </td>
- <td>
+37</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 33</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delete_keys_from!'>delete_keys_from!</span> <span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span>
<span class='kw'>return</span> <span class='id identifier rubyid_hash'>hash</span> <span class='kw'>if</span> <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span><span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_hash'>hash</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="load_file-class_method">
-
- .<strong>load_file</strong>(file_path, should_exists = false) ⇒ <tt>String</tt><sup>?</sup>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="load_file-class_method">
+
+ .<strong>load_file</strong>(file_path, should_exists = false) ⇒ <tt>String</tt><sup>?</sup>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Load and return file contents when exists.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>file_path</span>
-
-
- <span class='type'>(<tt>String</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>file_path</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>File path to load.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>should_exists</span>
-
-
- <span class='type'>(<tt>Boolean</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>false</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>should_exists</span>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>false</tt>)</em>
+
+
+ —
<div class='inline'>
<p>(false) Enforce file existance validation.</p>
-</div>
-
- </li>
-
-</ul>
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>File contents.</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
10
11
12
-13</pre>
- </td>
- <td>
+13</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 10</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span> <span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_should_exists'>should_exists</span> <span class='op'>=</span> <span class='kw'>false</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_should_exists'>should_exists</span> <span class='op'>||</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='rparen'>)</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_file_path'>file_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>encoding:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>UTF-8</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="load_json_file-class_method">
-
- .<strong>load_json_file</strong>(file_path, should_exists = false) ⇒ <tt>Hash</tt><sup>?</sup>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="load_json_file-class_method">
+
+ .<strong>load_json_file</strong>(file_path, should_exists = false) ⇒ <tt>Hash</tt><sup>?</sup>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Load and return file contents as json when exists.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>file_path</span>
-
-
- <span class='type'>(<tt>String</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>file_path</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>File path to load.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>should_exists</span>
-
-
- <span class='type'>(<tt>Boolean</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>false</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>should_exists</span>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>false</tt>)</em>
+
+
+ —
<div class='inline'>
<p>(false) Enforce file existance validation.</p>
-</div>
-
- </li>
-
-</ul>
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Json file contents.</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
21
22
23
24
-25</pre>
- </td>
- <td>
+25</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 21</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'>load_json_file</span> <span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_should_exists'>should_exists</span> <span class='op'>=</span> <span class='kw'>false</span>
<span class='id identifier rubyid_file_content'>file_content</span> <span class='op'>=</span> <span class='id identifier rubyid_load_file'>load_file</span> <span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_should_exists'>should_exists</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_file_content'>file_content</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_file_content'>file_content</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
<span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_file_content'>file_content</span><span class='rparen'>)</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="match?-class_method">
-
- .<strong>match?</strong>(element, filter, opts = {}) ⇒ <tt>Boolean</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="match?-class_method">
+
+ .<strong>match?</strong>(element, filter, opts = {}) ⇒ <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Check if an hash element match the filter.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>element</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>element</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Element to match.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>filter</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>filter</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Filters to apply.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>{}</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>opts</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
+
+
+ —
<div class='inline'>
<p>({}) Configuration options.</p>
-</div>
-
- </li>
-
-</ul>
-
-
-
-
-
-
-
-
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
- <ul class="option">
-
- <li>
- <span class="name">:sanitize</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+</ul>
+
+
+
+
+
+
+
+
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
+ <ul class="option">
+
+ <li>
+ <span class="name">:sanitize</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Sanitize element and filters when `true`.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:deep_stringify</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:deep_stringify</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ </span>
+
— <div class='inline'>
<p>If `true` then stringify all hash keys including sublevels before matching.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:exact_match</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- — default:
- <tt>true</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:exact_match</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>true</tt>
+
+ </span>
+
— <div class='inline'>
<p>Filter should match element exactly.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:skip_keys</span>
- <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
- <span class="default">
-
- — default:
- <tt>nil</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:skip_keys</span>
+ <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>nil</tt>
+
+ </span>
+
— <div class='inline'>
<p>Keys to skip on match.</p>
-</div>
-
- </li>
-
- </ul>
-
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Boolean</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ </ul>
+
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>`true` when element match filters, else `false`.</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
74
75
@@ -1325,13 +1325,13 @@
93
94
95
96
97
-98</pre>
- </td>
- <td>
+98</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 74</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span> <span class='id identifier rubyid_element'>element</span><span class='comma'>,</span> <span class='id identifier rubyid_filter'>filter</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='label'>sanitize:</span> <span class='kw'>true</span><span class='comma'>,</span>
@@ -1354,168 +1354,168 @@
</span> <span class='id identifier rubyid_filter'>filter</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='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_exact_match'>exact_match</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='id identifier rubyid_v'>v</span>
<span class='kw'>end</span>
<span class='kw'>true</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="match_collections-class_method">
-
- .<strong>match_collections</strong>(items_a, items_b, opts = {}) ⇒ <tt>Hash</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="match_collections-class_method">
+
+ .<strong>match_collections</strong>(items_a, items_b, opts = {}) ⇒ <tt>Hash</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Match two collections and calculate diff.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>items_a</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>items_a</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Item collection to match.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>items_b</span>
-
-
- <span class='type'>(<tt>Array</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>items_b</span>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Item collection to match.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
- <em class="default">(defaults to: <tt>{}</tt>)</em>
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>opts</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
+
+
+ —
<div class='inline'>
<p>({}) Configuration options.</p>
-</div>
-
- </li>
-
-</ul>
-
-
-
-
-
-
-
-
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
- <ul class="option">
-
- <li>
- <span class="name">:skip</span>
- <span class="type">(<tt>Array</tt>)</span>
- <span class="default">
-
- — default:
- <tt>nil</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+</ul>
+
+
+
+
+
+
+
+
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
+ <ul class="option">
+
+ <li>
+ <span class="name">:skip</span>
+ <span class="type">(<tt>Array</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>nil</tt>
+
+ </span>
+
— <div class='inline'>
<p>Keys to skip on match.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:compare_way</span>
- <span class="type">(<tt>Symbol</tt>)</span>
- <span class="default">
-
- — default:
- <tt>:left</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:compare_way</span>
+ <span class="type">(<tt>Symbol</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>:left</tt>
+
+ </span>
+
— <div class='inline'>
<p>Comparison way sense:</p>
<ul><li>
<p>`:both` Compare left and right.</p>
</li><li>
<p>`:right` Compare if `items_a` are inside `items_b`.</p>
</li><li>
<p>`:left` Compare if `items_b` are inside `items_a`.</p>
</li></ul>
-</div>
-
- </li>
-
- </ul>
-
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ </ul>
+
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>A hash with the following key pairs:</p>
<ul><li>
<p>`[Hash] :diff` Diff results with `:items_a` and `:items_b` keys.</p>
</li><li>
<p>`[Boolean] :match` `true` when match else `false`.</p>
</li></ul>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
213
214
@@ -1524,13 +1524,13 @@
217
218
219
220
221
-222</pre>
- </td>
- <td>
+222</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 213</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_match_collections'>match_collections</span> <span class='id identifier rubyid_items_a'>items_a</span><span class='comma'>,</span> <span class='id identifier rubyid_items_b'>items_b</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_diff'>diff</span> <span class='op'>=</span> <span class='id identifier rubyid_collection_diff'>collection_diff</span><span class='lparen'>(</span>
<span class='id identifier rubyid_items_a'>items_a</span><span class='comma'>,</span>
@@ -1538,133 +1538,133 @@
<span class='label'>skip_keys:</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:skip</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='label'>compare_way:</span> <span class='symbol'>:both</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:items_a</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:items_b</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'><</span> <span class='int'>1</span><span class='rparen'>)</span>
<span class='lbrace'>{</span><span class='label'>diff:</span> <span class='id identifier rubyid_diff'>diff</span><span class='comma'>,</span> <span class='label'>match:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="sanitize-class_method">
-
- .<strong>sanitize</strong>(raw_hash, opts) ⇒ <tt>Hash</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+ <div class="method_details ">
+ <h3 class="signature " id="sanitize-class_method">
+
+ .<strong>sanitize</strong>(raw_hash, opts) ⇒ <tt>Hash</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
<p>Sanitize a copy of the hash provided.</p>
-
-
- </div>
-</div>
-<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>raw_hash</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>raw_hash</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Hash to sanitize.</p>
-</div>
-
- </li>
-
- <li>
-
- <span class='name'>opts</span>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>opts</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>({}) Configuration options.</p>
-</div>
-
- </li>
-
-</ul>
-
-
-
-
-
-
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
- <ul class="option">
-
- <li>
- <span class="name">:deep_stringify</span>
- <span class="type">(<tt>Boolean</tt>)</span>
- <span class="default">
-
- </span>
-
+</div>
+
+ </li>
+
+</ul>
+
+
+
+
+
+
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
+ <ul class="option">
+
+ <li>
+ <span class="name">:deep_stringify</span>
+ <span class="type">(<tt>Boolean</tt>)</span>
+ <span class="default">
+
+ </span>
+
— <div class='inline'>
<p>If `true` then stringify all hash keys including sublevels.</p>
-</div>
-
- </li>
-
- <li>
- <span class="name">:skip_keys</span>
- <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
- <span class="default">
-
- — default:
- <tt>nil</tt>
-
- </span>
-
+</div>
+
+ </li>
+
+ <li>
+ <span class="name">:skip_keys</span>
+ <span class="type">(<tt>Array</tt>, <tt>nil</tt>)</span>
+ <span class="default">
+
+ — default:
+ <tt>nil</tt>
+
+ </span>
+
— <div class='inline'>
<p>Key array to delete from sanitized hash clone.</p>
-</div>
-
- </li>
-
- </ul>
-
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Hash</tt>)</span>
-
-
-
- —
+</div>
+
+ </li>
+
+ </ul>
+
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
<div class='inline'>
<p>Sanitized hash clone.</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
<pre class="lines">
49
50
@@ -1673,13 +1673,13 @@
53
54
55
56
57
-58</pre>
- </td>
- <td>
+58</pre>
+ </td>
+ <td>
<pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 49</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sanitize'>sanitize</span> <span class='id identifier rubyid_raw_hash'>raw_hash</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span>
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='label'>deep_stringify:</span> <span class='kw'>true</span><span class='comma'>,</span>
@@ -1687,24 +1687,24 @@
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
<span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:deep_stringify</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>?</span>
<span class='const'><span class='object_link'><a href="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Core.html" title="AeEasy::Core (module)">Core</a></span></span><span class='period'>.</span><span class='id identifier rubyid_deep_stringify_keys'>deep_stringify_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_hash'>raw_hash</span><span class='rparen'>)</span> <span class='op'>:</span>
<span class='const'><span class='object_link'><a href="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Core.html" title="AeEasy::Core (module)">Core</a></span></span><span class='period'>.</span><span class='id identifier rubyid_deep_clone'>deep_clone</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_hash'>raw_hash</span><span class='rparen'>)</span>
<span class='id identifier rubyid_delete_keys_from!'>delete_keys_from!</span> <span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:skip_keys</span><span class='rbracket'>]</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-</div>
-
- <div id="footer">
- Generated on Mon Mar 11 21:50:52 2019 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.18 (ruby-2.5.3).
-</div>
-
- </div>
- </body>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Thu Apr 25 19:39:30 2019 by
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+ 0.9.19 (ruby-2.5.3).
+</div>
+
+ </div>
+ </body>
</html>
\ No newline at end of file