facets 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +113 -13
- data/MANIFEST +23 -19
- data/RELEASE +22 -22
- data/VERSION +1 -1
- data/doc/{archive → changelogs}/CHANGELOG-0.10.30 +0 -0
- data/doc/{archive → changelogs}/CHANGELOG-1.8.54 +0 -0
- data/doc/{archive → changelogs}/CHANGELOG-2.4.5 +0 -0
- data/doc/log/basic_stats/index.html +4 -4
- data/doc/rdoc/core/classes/Array.html +148 -148
- data/doc/rdoc/core/classes/Binding.html +45 -45
- data/doc/rdoc/core/classes/Class.html +38 -38
- data/doc/rdoc/core/classes/Comparable.html +26 -26
- data/doc/rdoc/core/classes/Enumerable.html +224 -139
- data/doc/rdoc/core/classes/Enumerable/Enumerator.html +126 -13
- data/doc/rdoc/core/classes/Enumerator.html +123 -13
- data/doc/rdoc/core/classes/Exception.html +8 -8
- data/doc/rdoc/core/classes/File.html +58 -58
- data/doc/rdoc/core/classes/FileTest.html +4 -4
- data/doc/rdoc/core/classes/Float.html +8 -8
- data/doc/rdoc/core/classes/Functor.html +12 -12
- data/doc/rdoc/core/classes/Hash.html +289 -266
- data/doc/rdoc/core/classes/Indexable.html +110 -110
- data/doc/rdoc/core/classes/Integer.html +2 -2
- data/doc/rdoc/core/classes/Kernel.html +329 -329
- data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
- data/doc/rdoc/core/classes/MatchData.html +15 -15
- data/doc/rdoc/core/classes/Module.html +161 -161
- data/doc/rdoc/core/classes/NilClass.html +23 -23
- data/doc/rdoc/core/classes/Numeric.html +27 -27
- data/doc/rdoc/core/classes/Object.html +8 -8
- data/doc/rdoc/core/classes/ObjectSpace.html +5 -5
- data/doc/rdoc/core/classes/Proc.html +22 -22
- data/doc/rdoc/core/classes/Regexp.html +1 -1
- data/doc/rdoc/core/classes/Stackable.html +31 -31
- data/doc/rdoc/core/classes/String.html +270 -270
- data/doc/rdoc/core/classes/Symbol.html +1 -1
- data/doc/rdoc/core/classes/TrueClass.html +8 -8
- data/doc/rdoc/core/classes/UnboundMethod.html +12 -12
- data/doc/rdoc/core/created.rid +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/dearray_values_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/to_hash_rb.html +2 -1
- data/doc/rdoc/core/fr_file_index.html +1 -0
- data/doc/rdoc/core/fr_method_index.html +401 -385
- data/doc/{archive → release-notes}/RELEASE-2.0.5 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.1.0 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.1.1 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.1.2 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.1.3 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.2.0 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.2.1 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.3.0 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.0 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.1 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.2 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.3 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.4 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.4.5 +0 -0
- data/doc/{archive → release-notes}/RELEASE-2.5.0 +0 -0
- data/lib/core/facets/hash/dearray_values.rb +46 -0
- data/lib/core/facets/to_hash.rb +109 -74
- data/task/setup.rake +17 -9
- data/test/core/hash/test_dearray_values.rb +19 -0
- data/test/core/test_to_hash.rb +116 -24
- metadata +26 -21
@@ -73,7 +73,7 @@
|
|
73
73
|
|
74
74
|
|
75
75
|
<div class="sectiontitle">Methods</div>
|
76
|
-
<span style="padding-right: 5px;"><a href="#
|
76
|
+
<span style="padding-right: 5px;"><a href="#M000360">root?</a></span>
|
77
77
|
|
78
78
|
|
79
79
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
<div class="sectiontitle">Public Instance methods</div>
|
84
84
|
<div class="method">
|
85
85
|
<div class="title">
|
86
|
-
<a name="
|
86
|
+
<a name="M000360"></a><b>root?</b>(dir=nil)
|
87
87
|
</div>
|
88
88
|
<div class="description">
|
89
89
|
<p>
|
@@ -94,8 +94,8 @@ CREDIT: Jeffrey Schwab
|
|
94
94
|
</p>
|
95
95
|
</div>
|
96
96
|
<div class="sourcecode">
|
97
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
98
|
-
<div id="
|
97
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000360_source')" id="l_M000360_source">+</a> ]</p>
|
98
|
+
<div id="M000360_source" class="dyn-source">
|
99
99
|
<pre>
|
100
100
|
<span class="ruby-comment cmt"># File lib/core/facets/filetest/root.rb, line 9</span>
|
101
101
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root?</span>(<span class="ruby-identifier">dir</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -81,8 +81,8 @@ Object
|
|
81
81
|
|
82
82
|
|
83
83
|
<div class="sectiontitle">Methods</div>
|
84
|
-
<span style="padding-right: 5px;"><a href="#
|
85
|
-
<span style="padding-right: 5px;"><a href="#
|
84
|
+
<span style="padding-right: 5px;"><a href="#M000223">round_at</a></span>
|
85
|
+
<span style="padding-right: 5px;"><a href="#M000224">round_to</a></span>
|
86
86
|
|
87
87
|
|
88
88
|
|
@@ -92,7 +92,7 @@ Object
|
|
92
92
|
<div class="sectiontitle">Public Instance methods</div>
|
93
93
|
<div class="method">
|
94
94
|
<div class="title">
|
95
|
-
<a name="
|
95
|
+
<a name="M000223"></a><b>round_at</b>( d )
|
96
96
|
</div>
|
97
97
|
<div class="description">
|
98
98
|
<p>
|
@@ -109,8 +109,8 @@ CREDIT: Trans
|
|
109
109
|
</p>
|
110
110
|
</div>
|
111
111
|
<div class="sourcecode">
|
112
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
113
|
-
<div id="
|
112
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000223_source')" id="l_M000223_source">+</a> ]</p>
|
113
|
+
<div id="M000223_source" class="dyn-source">
|
114
114
|
<pre>
|
115
115
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 50</span>
|
116
116
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>( <span class="ruby-identifier">d</span> ) <span class="ruby-comment cmt">#d=0</span>
|
@@ -122,7 +122,7 @@ CREDIT: Trans
|
|
122
122
|
</div>
|
123
123
|
<div class="method">
|
124
124
|
<div class="title">
|
125
|
-
<a name="
|
125
|
+
<a name="M000224"></a><b>round_to</b>( n )
|
126
126
|
</div>
|
127
127
|
<div class="description">
|
128
128
|
<p>
|
@@ -139,8 +139,8 @@ CREDIT: Trans
|
|
139
139
|
</p>
|
140
140
|
</div>
|
141
141
|
<div class="sourcecode">
|
142
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
143
|
-
<div id="
|
142
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000224_source')" id="l_M000224_source">+</a> ]</p>
|
143
|
+
<div id="M000224_source" class="dyn-source">
|
144
144
|
<pre>
|
145
145
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 63</span>
|
146
146
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>( <span class="ruby-identifier">n</span> ) <span class="ruby-comment cmt">#n=1</span>
|
@@ -99,9 +99,9 @@ accorrding to the operation applied to it.
|
|
99
99
|
|
100
100
|
|
101
101
|
<div class="sectiontitle">Methods</div>
|
102
|
-
<span style="padding-right: 5px;"><a href="#
|
103
|
-
<span style="padding-right: 5px;"><a href="#
|
104
|
-
<span style="padding-right: 5px;"><a href="#
|
102
|
+
<span style="padding-right: 5px;"><a href="#M000240">method_missing</a></span>
|
103
|
+
<span style="padding-right: 5px;"><a href="#M000238">new</a></span>
|
104
|
+
<span style="padding-right: 5px;"><a href="#M000239">to_proc</a></span>
|
105
105
|
|
106
106
|
|
107
107
|
|
@@ -111,11 +111,11 @@ accorrding to the operation applied to it.
|
|
111
111
|
<div class="sectiontitle">Public Class methods</div>
|
112
112
|
<div class="method">
|
113
113
|
<div class="title">
|
114
|
-
<a name="
|
114
|
+
<a name="M000238"></a><b>new</b>(&function)
|
115
115
|
</div>
|
116
116
|
<div class="sourcecode">
|
117
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
118
|
-
<div id="
|
117
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000238_source')" id="l_M000238_source">+</a> ]</p>
|
118
|
+
<div id="M000238_source" class="dyn-source">
|
119
119
|
<pre>
|
120
120
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 63</span>
|
121
121
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">function</span>)
|
@@ -128,7 +128,7 @@ accorrding to the operation applied to it.
|
|
128
128
|
<div class="sectiontitle">Public Instance methods</div>
|
129
129
|
<div class="method">
|
130
130
|
<div class="title">
|
131
|
-
<a name="
|
131
|
+
<a name="M000240"></a><b>method_missing</b>(op, *args, &blk)
|
132
132
|
</div>
|
133
133
|
<div class="description">
|
134
134
|
<p>
|
@@ -136,8 +136,8 @@ Any action against the functor is processesd by the function.
|
|
136
136
|
</p>
|
137
137
|
</div>
|
138
138
|
<div class="sourcecode">
|
139
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
140
|
-
<div id="
|
139
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000240_source')" id="l_M000240_source">+</a> ]</p>
|
140
|
+
<div id="M000240_source" class="dyn-source">
|
141
141
|
<pre>
|
142
142
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 72</span>
|
143
143
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -149,11 +149,11 @@ Any action against the functor is processesd by the function.
|
|
149
149
|
</div>
|
150
150
|
<div class="method">
|
151
151
|
<div class="title">
|
152
|
-
<a name="
|
152
|
+
<a name="M000239"></a><b>to_proc</b>()
|
153
153
|
</div>
|
154
154
|
<div class="sourcecode">
|
155
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
156
|
-
<div id="
|
155
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000239_source')" id="l_M000239_source">+</a> ]</p>
|
156
|
+
<div id="M000239_source" class="dyn-source">
|
157
157
|
<pre>
|
158
158
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 67</span>
|
159
159
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
|
@@ -60,6 +60,7 @@
|
|
60
60
|
<a href="../files/lib/core/facets/to_hash_rb.html">lib/core/facets/to_hash.rb</a>
|
61
61
|
<a href="../files/lib/core/facets/hash/new_with_rb.html">lib/core/facets/hash/new_with.rb</a>
|
62
62
|
<a href="../files/lib/core/facets/hash/zipnew_rb.html">lib/core/facets/hash/zipnew.rb</a>
|
63
|
+
<a href="../files/lib/core/facets/hash/dearray_values_rb.html">lib/core/facets/hash/dearray_values.rb</a>
|
63
64
|
<a href="../files/lib/core/facets/hash/update_values_rb.html">lib/core/facets/hash/update_values.rb</a>
|
64
65
|
<a href="../files/lib/core/facets/hash/alias_rb.html">lib/core/facets/hash/alias.rb</a>
|
65
66
|
<a href="../files/lib/core/facets/hash/autonew_rb.html">lib/core/facets/hash/autonew.rb</a>
|
@@ -120,66 +121,67 @@ Object
|
|
120
121
|
|
121
122
|
|
122
123
|
<div class="sectiontitle">Methods</div>
|
123
|
-
<span style="padding-right: 5px;"><a href="#
|
124
|
-
<span style="padding-right: 5px;"><a href="#
|
125
|
-
<span style="padding-right: 5px;"><a href="#
|
126
|
-
<span style="padding-right: 5px;"><a href="#
|
127
|
-
<span style="padding-right: 5px;"><a href="#
|
128
|
-
<span style="padding-right: 5px;"><a href="#
|
129
|
-
<span style="padding-right: 5px;"><a href="#
|
130
|
-
<span style="padding-right: 5px;"><a href="#
|
131
|
-
<span style="padding-right: 5px;"><a href="#
|
132
|
-
<span style="padding-right: 5px;"><a href="#
|
133
|
-
<span style="padding-right: 5px;"><a href="#
|
134
|
-
<span style="padding-right: 5px;"><a href="#
|
135
|
-
<span style="padding-right: 5px;"><a href="#
|
136
|
-
<span style="padding-right: 5px;"><a href="#
|
137
|
-
<span style="padding-right: 5px;"><a href="#
|
138
|
-
<span style="padding-right: 5px;"><a href="#
|
139
|
-
<span style="padding-right: 5px;"><a href="#
|
140
|
-
<span style="padding-right: 5px;"><a href="#
|
141
|
-
<span style="padding-right: 5px;"><a href="#
|
142
|
-
<span style="padding-right: 5px;"><a href="#
|
143
|
-
<span style="padding-right: 5px;"><a href="#
|
144
|
-
<span style="padding-right: 5px;"><a href="#
|
145
|
-
<span style="padding-right: 5px;"><a href="#
|
146
|
-
<span style="padding-right: 5px;"><a href="#
|
147
|
-
<span style="padding-right: 5px;"><a href="#
|
148
|
-
<span style="padding-right: 5px;"><a href="#
|
149
|
-
<span style="padding-right: 5px;"><a href="#
|
150
|
-
<span style="padding-right: 5px;"><a href="#
|
151
|
-
<span style="padding-right: 5px;"><a href="#
|
152
|
-
<span style="padding-right: 5px;"><a href="#
|
153
|
-
<span style="padding-right: 5px;"><a href="#
|
154
|
-
<span style="padding-right: 5px;"><a href="#
|
155
|
-
<span style="padding-right: 5px;"><a href="#
|
156
|
-
<span style="padding-right: 5px;"><a href="#
|
157
|
-
<span style="padding-right: 5px;"><a href="#
|
158
|
-
<span style="padding-right: 5px;"><a href="#
|
159
|
-
<span style="padding-right: 5px;"><a href="#
|
160
|
-
<span style="padding-right: 5px;"><a href="#
|
161
|
-
<span style="padding-right: 5px;"><a href="#
|
162
|
-
<span style="padding-right: 5px;"><a href="#
|
163
|
-
<span style="padding-right: 5px;"><a href="#
|
164
|
-
<span style="padding-right: 5px;"><a href="#
|
165
|
-
<span style="padding-right: 5px;"><a href="#
|
166
|
-
<span style="padding-right: 5px;"><a href="#
|
167
|
-
<span style="padding-right: 5px;"><a href="#
|
168
|
-
<span style="padding-right: 5px;"><a href="#
|
169
|
-
<span style="padding-right: 5px;"><a href="#
|
170
|
-
<span style="padding-right: 5px;"><a href="#
|
171
|
-
<span style="padding-right: 5px;"><a href="#
|
172
|
-
<span style="padding-right: 5px;"><a href="#
|
173
|
-
<span style="padding-right: 5px;"><a href="#
|
174
|
-
<span style="padding-right: 5px;"><a href="#
|
175
|
-
<span style="padding-right: 5px;"><a href="#
|
176
|
-
<span style="padding-right: 5px;"><a href="#
|
177
|
-
<span style="padding-right: 5px;"><a href="#
|
178
|
-
<span style="padding-right: 5px;"><a href="#
|
179
|
-
<span style="padding-right: 5px;"><a href="#
|
180
|
-
<span style="padding-right: 5px;"><a href="#
|
181
|
-
<span style="padding-right: 5px;"><a href="#
|
182
|
-
<span style="padding-right: 5px;"><a href="#
|
124
|
+
<span style="padding-right: 5px;"><a href="#M000086">&</a></span>
|
125
|
+
<span style="padding-right: 5px;"><a href="#M000101">*</a></span>
|
126
|
+
<span style="padding-right: 5px;"><a href="#M000130">+</a></span>
|
127
|
+
<span style="padding-right: 5px;"><a href="#M000087">-</a></span>
|
128
|
+
<span style="padding-right: 5px;"><a href="#M000102"><<</a></span>
|
129
|
+
<span style="padding-right: 5px;"><a href="#M000082">alias!</a></span>
|
130
|
+
<span style="padding-right: 5px;"><a href="#M000135">argumentize</a></span>
|
131
|
+
<span style="padding-right: 5px;"><a href="#M000083">autonew</a></span>
|
132
|
+
<span style="padding-right: 5px;"><a href="#M000113">collate</a></span>
|
133
|
+
<span style="padding-right: 5px;"><a href="#M000114">collate!</a></span>
|
134
|
+
<span style="padding-right: 5px;"><a href="#M000080">dearray_singular_values</a></span>
|
135
|
+
<span style="padding-right: 5px;"><a href="#M000079">dearray_values</a></span>
|
136
|
+
<span style="padding-right: 5px;"><a href="#M000115">delete_unless</a></span>
|
137
|
+
<span style="padding-right: 5px;"><a href="#M000116">delete_values</a></span>
|
138
|
+
<span style="padding-right: 5px;"><a href="#M000117">delete_values_at</a></span>
|
139
|
+
<span style="padding-right: 5px;"><a href="#M000110">diff</a></span>
|
140
|
+
<span style="padding-right: 5px;"><a href="#M000094">each_with_key</a></span>
|
141
|
+
<span style="padding-right: 5px;"><a href="#M000088">except</a></span>
|
142
|
+
<span style="padding-right: 5px;"><a href="#M000089">except!</a></span>
|
143
|
+
<span style="padding-right: 5px;"><a href="#M000112">graph!</a></span>
|
144
|
+
<span style="padding-right: 5px;"><a href="#M000126">group_by_value</a></span>
|
145
|
+
<span style="padding-right: 5px;"><a href="#M000090">has_keys?</a></span>
|
146
|
+
<span style="padding-right: 5px;"><a href="#M000092">has_only_keys?</a></span>
|
147
|
+
<span style="padding-right: 5px;"><a href="#M000108">insert</a></span>
|
148
|
+
<span style="padding-right: 5px;"><a href="#M000103">inverse</a></span>
|
149
|
+
<span style="padding-right: 5px;"><a href="#M000125">join</a></span>
|
150
|
+
<span style="padding-right: 5px;"><a href="#M000091">keys?</a></span>
|
151
|
+
<span style="padding-right: 5px;"><a href="#M000111">mash!</a></span>
|
152
|
+
<span style="padding-right: 5px;"><a href="#M000077">new_with</a></span>
|
153
|
+
<span style="padding-right: 5px;"><a href="#M000093">only_keys?</a></span>
|
154
|
+
<span style="padding-right: 5px;"><a href="#M000104">recursive_merge</a></span>
|
155
|
+
<span style="padding-right: 5px;"><a href="#M000105">recursive_merge!</a></span>
|
156
|
+
<span style="padding-right: 5px;"><a href="#M000084">recursively</a></span>
|
157
|
+
<span style="padding-right: 5px;"><a href="#M000085">recursively!</a></span>
|
158
|
+
<span style="padding-right: 5px;"><a href="#M000131">rekey</a></span>
|
159
|
+
<span style="padding-right: 5px;"><a href="#M000132">rekey!</a></span>
|
160
|
+
<span style="padding-right: 5px;"><a href="#M000127">replace_each</a></span>
|
161
|
+
<span style="padding-right: 5px;"><a href="#M000095">reverse_merge</a></span>
|
162
|
+
<span style="padding-right: 5px;"><a href="#M000096">reverse_merge!</a></span>
|
163
|
+
<span style="padding-right: 5px;"><a href="#M000097">reverse_update</a></span>
|
164
|
+
<span style="padding-right: 5px;"><a href="#M000109">select!</a></span>
|
165
|
+
<span style="padding-right: 5px;"><a href="#M000128">slice</a></span>
|
166
|
+
<span style="padding-right: 5px;"><a href="#M000129">slice!</a></span>
|
167
|
+
<span style="padding-right: 5px;"><a href="#M000123">stringify_keys</a></span>
|
168
|
+
<span style="padding-right: 5px;"><a href="#M000124">stringify_keys!</a></span>
|
169
|
+
<span style="padding-right: 5px;"><a href="#M000119">swap!</a></span>
|
170
|
+
<span style="padding-right: 5px;"><a href="#M000121">symbolize_keys</a></span>
|
171
|
+
<span style="padding-right: 5px;"><a href="#M000122">symbolize_keys!</a></span>
|
172
|
+
<span style="padding-right: 5px;"><a href="#M000075">to_h</a></span>
|
173
|
+
<span style="padding-right: 5px;"><a href="#M000076">to_hash</a></span>
|
174
|
+
<span style="padding-right: 5px;"><a href="#M000106">to_proc</a></span>
|
175
|
+
<span style="padding-right: 5px;"><a href="#M000107">to_proc_with_reponse</a></span>
|
176
|
+
<span style="padding-right: 5px;"><a href="#M000120">to_struct</a></span>
|
177
|
+
<span style="padding-right: 5px;"><a href="#M000098">traverse</a></span>
|
178
|
+
<span style="padding-right: 5px;"><a href="#M000099">traverse!</a></span>
|
179
|
+
<span style="padding-right: 5px;"><a href="#M000133">update_each</a></span>
|
180
|
+
<span style="padding-right: 5px;"><a href="#M000134">update_keys</a></span>
|
181
|
+
<span style="padding-right: 5px;"><a href="#M000081">update_values</a></span>
|
182
|
+
<span style="padding-right: 5px;"><a href="#M000118">weave</a></span>
|
183
|
+
<span style="padding-right: 5px;"><a href="#M000078">zipnew</a></span>
|
184
|
+
<span style="padding-right: 5px;"><a href="#M000100">|</a></span>
|
183
185
|
|
184
186
|
|
185
187
|
|
@@ -189,7 +191,7 @@ Object
|
|
189
191
|
<div class="sectiontitle">Public Class methods</div>
|
190
192
|
<div class="method">
|
191
193
|
<div class="title">
|
192
|
-
<a name="
|
194
|
+
<a name="M000083"></a><b>autonew</b>(*args)
|
193
195
|
</div>
|
194
196
|
<div class="description">
|
195
197
|
<pre>
|
@@ -212,8 +214,8 @@ CREDIT: Trans, Jan Molic
|
|
212
214
|
</p>
|
213
215
|
</div>
|
214
216
|
<div class="sourcecode">
|
215
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
216
|
-
<div id="
|
217
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">+</a> ]</p>
|
218
|
+
<div id="M000083_source" class="dyn-source">
|
217
219
|
<pre>
|
218
220
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/autonew.rb, line 19</span>
|
219
221
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">autonew</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -227,22 +229,22 @@ CREDIT: Trans, Jan Molic
|
|
227
229
|
</div>
|
228
230
|
<div class="method">
|
229
231
|
<div class="title">
|
230
|
-
<a name="
|
232
|
+
<a name="M000077"></a><b>new_with</b>( {|| ...}
|
231
233
|
</div>
|
232
234
|
<div class="description">
|
233
235
|
<p>
|
234
236
|
Instantiate a new hash with a default value determined by the block.
|
235
237
|
</p>
|
236
238
|
<p>
|
237
|
-
<a href="Hash.html#
|
239
|
+
<a href="Hash.html#M000077">Hash.new_with</a> { [] }
|
238
240
|
</p>
|
239
241
|
<p>
|
240
242
|
CREDIT: Pit Capitan
|
241
243
|
</p>
|
242
244
|
</div>
|
243
245
|
<div class="sourcecode">
|
244
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
245
|
-
<div id="
|
246
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">+</a> ]</p>
|
247
|
+
<div id="M000077_source" class="dyn-source">
|
246
248
|
<pre>
|
247
249
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/new_with.rb, line 10</span>
|
248
250
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new_with</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -254,7 +256,7 @@ CREDIT: Pit Capitan
|
|
254
256
|
</div>
|
255
257
|
<div class="method">
|
256
258
|
<div class="title">
|
257
|
-
<a name="
|
259
|
+
<a name="M000078"></a><b>zipnew</b>(keys,values)
|
258
260
|
</div>
|
259
261
|
<div class="description">
|
260
262
|
<p>
|
@@ -269,8 +271,8 @@ CREDIT: Trans, Ara T. Howard
|
|
269
271
|
</p>
|
270
272
|
</div>
|
271
273
|
<div class="sourcecode">
|
272
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
273
|
-
<div id="
|
274
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">+</a> ]</p>
|
275
|
+
<div id="M000078_source" class="dyn-source">
|
274
276
|
<pre>
|
275
277
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/zipnew.rb, line 11</span>
|
276
278
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zipnew</span>(<span class="ruby-identifier">keys</span>,<span class="ruby-identifier">values</span>) <span class="ruby-comment cmt"># or some better name</span>
|
@@ -285,7 +287,7 @@ CREDIT: Trans, Ara T. Howard
|
|
285
287
|
<div class="sectiontitle">Public Instance methods</div>
|
286
288
|
<div class="method">
|
287
289
|
<div class="title">
|
288
|
-
<a name="
|
290
|
+
<a name="M000086"></a><b>&</b>(other)
|
289
291
|
</div>
|
290
292
|
<div class="description">
|
291
293
|
<p>
|
@@ -310,8 +312,8 @@ CREDIT: Trans
|
|
310
312
|
</p>
|
311
313
|
</div>
|
312
314
|
<div class="sourcecode">
|
313
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
314
|
-
<div id="
|
315
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">+</a> ]</p>
|
316
|
+
<div id="M000086_source" class="dyn-source">
|
315
317
|
<pre>
|
316
318
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_and.rb, line 19</span>
|
317
319
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">&</span>(<span class="ruby-identifier">other</span>)
|
@@ -332,7 +334,7 @@ CREDIT: Trans
|
|
332
334
|
</div>
|
333
335
|
<div class="method">
|
334
336
|
<div class="title">
|
335
|
-
<a name="
|
337
|
+
<a name="M000101"></a><b>*</b>(other)
|
336
338
|
</div>
|
337
339
|
<div class="description">
|
338
340
|
<p>
|
@@ -350,8 +352,8 @@ CREDIT: Trans
|
|
350
352
|
</p>
|
351
353
|
</div>
|
352
354
|
<div class="sourcecode">
|
353
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
354
|
-
<div id="
|
355
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">+</a> ]</p>
|
356
|
+
<div id="M000101_source" class="dyn-source">
|
355
357
|
<pre>
|
356
358
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_mul.rb, line 13</span>
|
357
359
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">other</span>)
|
@@ -363,7 +365,7 @@ CREDIT: Trans
|
|
363
365
|
</div>
|
364
366
|
<div class="method">
|
365
367
|
<div class="title">
|
366
|
-
<a name="
|
368
|
+
<a name="M000130"></a><b>+</b>(other)
|
367
369
|
</div>
|
368
370
|
<div class="description">
|
369
371
|
<p>
|
@@ -374,8 +376,8 @@ CREDIT: Trans
|
|
374
376
|
</p>
|
375
377
|
</div>
|
376
378
|
<div class="sourcecode">
|
377
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
378
|
-
<div id="
|
379
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000130_source')" id="l_M000130_source">+</a> ]</p>
|
380
|
+
<div id="M000130_source" class="dyn-source">
|
379
381
|
<pre>
|
380
382
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_add.rb, line 7</span>
|
381
383
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">other</span>)
|
@@ -387,7 +389,7 @@ CREDIT: Trans
|
|
387
389
|
</div>
|
388
390
|
<div class="method">
|
389
391
|
<div class="title">
|
390
|
-
<a name="
|
392
|
+
<a name="M000087"></a><b>-</b>(other)
|
391
393
|
</div>
|
392
394
|
<div class="description">
|
393
395
|
<p>
|
@@ -400,8 +402,8 @@ CREDIT: Trans
|
|
400
402
|
</p>
|
401
403
|
</div>
|
402
404
|
<div class="sourcecode">
|
403
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
404
|
-
<div id="
|
405
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">+</a> ]</p>
|
406
|
+
<div id="M000087_source" class="dyn-source">
|
405
407
|
<pre>
|
406
408
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_sub.rb, line 9</span>
|
407
409
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">other</span>)
|
@@ -425,7 +427,7 @@ CREDIT: Trans
|
|
425
427
|
</div>
|
426
428
|
<div class="method">
|
427
429
|
<div class="title">
|
428
|
-
<a name="
|
430
|
+
<a name="M000102"></a><b><<</b>(other)
|
429
431
|
</div>
|
430
432
|
<div class="description">
|
431
433
|
<p>
|
@@ -436,8 +438,8 @@ CREDIT: Trans
|
|
436
438
|
</p>
|
437
439
|
</div>
|
438
440
|
<div class="sourcecode">
|
439
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
440
|
-
<div id="
|
441
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">+</a> ]</p>
|
442
|
+
<div id="M000102_source" class="dyn-source">
|
441
443
|
<pre>
|
442
444
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_push.rb, line 8</span>
|
443
445
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">other</span>)
|
@@ -454,7 +456,7 @@ CREDIT: Trans
|
|
454
456
|
</div>
|
455
457
|
<div class="method">
|
456
458
|
<div class="title">
|
457
|
-
<a name="
|
459
|
+
<a name="M000082"></a><b>alias!</b>(newkey, oldkey)
|
458
460
|
</div>
|
459
461
|
<div class="description">
|
460
462
|
<p>
|
@@ -489,8 +491,8 @@ TODO: Rename to aliaskey or something else.
|
|
489
491
|
</p>
|
490
492
|
</div>
|
491
493
|
<div class="sourcecode">
|
492
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
493
|
-
<div id="
|
494
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000082_source')" id="l_M000082_source">+</a> ]</p>
|
495
|
+
<div id="M000082_source" class="dyn-source">
|
494
496
|
<pre>
|
495
497
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/alias.rb, line 25</span>
|
496
498
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alias!</span>(<span class="ruby-identifier">newkey</span>, <span class="ruby-identifier">oldkey</span>)
|
@@ -503,7 +505,7 @@ TODO: Rename to aliaskey or something else.
|
|
503
505
|
</div>
|
504
506
|
<div class="method">
|
505
507
|
<div class="title">
|
506
|
-
<a name="
|
508
|
+
<a name="M000135"></a><b>argumentize</b>(args_field=nil)
|
507
509
|
</div>
|
508
510
|
<div class="description">
|
509
511
|
<p>
|
@@ -517,8 +519,8 @@ Turn a hash into arguments.
|
|
517
519
|
</pre>
|
518
520
|
</div>
|
519
521
|
<div class="sourcecode">
|
520
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
521
|
-
<div id="
|
522
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000135_source')" id="l_M000135_source">+</a> ]</p>
|
523
|
+
<div id="M000135_source" class="dyn-source">
|
522
524
|
<pre>
|
523
525
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/argumentize.rb, line 10</span>
|
524
526
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">argumentize</span>(<span class="ruby-identifier">args_field</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -537,7 +539,7 @@ Turn a hash into arguments.
|
|
537
539
|
</div>
|
538
540
|
<div class="method">
|
539
541
|
<div class="title">
|
540
|
-
<a name="
|
542
|
+
<a name="M000113"></a><b>collate</b>(other_hash)
|
541
543
|
</div>
|
542
544
|
<div class="description">
|
543
545
|
<p>
|
@@ -553,8 +555,8 @@ CREDIT: Tilo Sloboda CREDIT: Gavin Kistner (Phrogz)
|
|
553
555
|
</p>
|
554
556
|
</div>
|
555
557
|
<div class="sourcecode">
|
556
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
557
|
-
<div id="
|
558
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">+</a> ]</p>
|
559
|
+
<div id="M000113_source" class="dyn-source">
|
558
560
|
<pre>
|
559
561
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/collate.rb, line 12</span>
|
560
562
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate</span>(<span class="ruby-identifier">other_hash</span>)
|
@@ -590,17 +592,17 @@ CREDIT: Tilo Sloboda CREDIT: Gavin Kistner (Phrogz)
|
|
590
592
|
</div>
|
591
593
|
<div class="method">
|
592
594
|
<div class="title">
|
593
|
-
<a name="
|
595
|
+
<a name="M000114"></a><b>collate!</b>(other_hash)
|
594
596
|
</div>
|
595
597
|
<div class="description">
|
596
598
|
<p>
|
597
|
-
The same as <a href="Hash.html#
|
599
|
+
The same as <a href="Hash.html#M000113">collate</a>, but modifies the
|
598
600
|
receiver in place.
|
599
601
|
</p>
|
600
602
|
</div>
|
601
603
|
<div class="sourcecode">
|
602
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
603
|
-
<div id="
|
604
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">+</a> ]</p>
|
605
|
+
<div id="M000114_source" class="dyn-source">
|
604
606
|
<pre>
|
605
607
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/collate.rb, line 42</span>
|
606
608
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate!</span>(<span class="ruby-identifier">other_hash</span>)
|
@@ -613,27 +615,26 @@ receiver in place.
|
|
613
615
|
</div>
|
614
616
|
<div class="method">
|
615
617
|
<div class="title">
|
616
|
-
<a name="
|
618
|
+
<a name="M000080"></a><b>dearray_singular_values</b>()
|
617
619
|
</div>
|
618
620
|
<div class="description">
|
619
621
|
<p>
|
620
|
-
Any array values with
|
621
|
-
set as the value instead.
|
622
|
+
Any array values with one or no elements will be set to the element or nil.
|
622
623
|
</p>
|
623
624
|
<pre>
|
624
625
|
h = { :a=>[1], :b=>[1,2], :c=>3, :d=>[] }
|
625
|
-
h.
|
626
|
+
h.dearray_singular_values #=> { :a=>1, :b=>[1,2], :c=>3, :d=>nil }
|
626
627
|
</pre>
|
627
628
|
<p>
|
628
629
|
CREDIT: Trans
|
629
630
|
</p>
|
630
631
|
</div>
|
631
632
|
<div class="sourcecode">
|
632
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
633
|
-
<div id="
|
633
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000080_source')" id="l_M000080_source">+</a> ]</p>
|
634
|
+
<div id="M000080_source" class="dyn-source">
|
634
635
|
<pre>
|
635
|
-
<span class="ruby-comment cmt"># File lib/core/facets/
|
636
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
636
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/dearray_values.rb, line 32</span>
|
637
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dearray_singular_values</span>
|
637
638
|
<span class="ruby-identifier">h</span> = {}
|
638
639
|
<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
639
640
|
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">v</span>
|
@@ -651,12 +652,12 @@ CREDIT: Trans
|
|
651
652
|
</div>
|
652
653
|
<div class="method">
|
653
654
|
<div class="title">
|
654
|
-
<a name="
|
655
|
+
<a name="M000079"></a><b>dearray_values</b>(index=0)
|
655
656
|
</div>
|
656
657
|
<div class="description">
|
657
658
|
<p>
|
658
|
-
Any array values with
|
659
|
-
|
659
|
+
Any array values with be replaced with the first element of the array.
|
660
|
+
Arrays with no elements will be set to nil.
|
660
661
|
</p>
|
661
662
|
<pre>
|
662
663
|
h = { :a=>[1], :b=>[1,2], :c=>3, :d=>[] }
|
@@ -667,10 +668,10 @@ CREDIT: Trans
|
|
667
668
|
</p>
|
668
669
|
</div>
|
669
670
|
<div class="sourcecode">
|
670
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
671
|
-
<div id="
|
671
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">+</a> ]</p>
|
672
|
+
<div id="M000079_source" class="dyn-source">
|
672
673
|
<pre>
|
673
|
-
<span class="ruby-comment cmt"># File lib/core/facets/
|
674
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/dearray_values.rb, line 11</span>
|
674
675
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dearray_values</span>(<span class="ruby-identifier">index</span>=<span class="ruby-value">0</span>)
|
675
676
|
<span class="ruby-identifier">h</span> = {}
|
676
677
|
<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
@@ -689,7 +690,7 @@ CREDIT: Trans
|
|
689
690
|
</div>
|
690
691
|
<div class="method">
|
691
692
|
<div class="title">
|
692
|
-
<a name="
|
693
|
+
<a name="M000115"></a><b>delete_unless</b>( {|| ...}
|
693
694
|
</div>
|
694
695
|
<div class="description">
|
695
696
|
<p>
|
@@ -700,8 +701,8 @@ CREDIT: Daniel Schierbeck
|
|
700
701
|
</p>
|
701
702
|
</div>
|
702
703
|
<div class="sourcecode">
|
703
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
704
|
-
<div id="
|
704
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">+</a> ]</p>
|
705
|
+
<div id="M000115_source" class="dyn-source">
|
705
706
|
<pre>
|
706
707
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 11</span>
|
707
708
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_unless</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -713,7 +714,7 @@ CREDIT: Daniel Schierbeck
|
|
713
714
|
</div>
|
714
715
|
<div class="method">
|
715
716
|
<div class="title">
|
716
|
-
<a name="
|
717
|
+
<a name="M000116"></a><b>delete_values</b>(*values)
|
717
718
|
</div>
|
718
719
|
<div class="description">
|
719
720
|
<p>
|
@@ -730,8 +731,8 @@ CREDIT: Daniel Schierbeck
|
|
730
731
|
</p>
|
731
732
|
</div>
|
732
733
|
<div class="sourcecode">
|
733
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
734
|
-
<div id="
|
734
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">+</a> ]</p>
|
735
|
+
<div id="M000116_source" class="dyn-source">
|
735
736
|
<pre>
|
736
737
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 24</span>
|
737
738
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_values</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">values</span>)
|
@@ -743,7 +744,7 @@ CREDIT: Daniel Schierbeck
|
|
743
744
|
</div>
|
744
745
|
<div class="method">
|
745
746
|
<div class="title">
|
746
|
-
<a name="
|
747
|
+
<a name="M000117"></a><b>delete_values_at</b>(*keys, &yld)
|
747
748
|
</div>
|
748
749
|
<div class="description">
|
749
750
|
<p>
|
@@ -766,8 +767,8 @@ CREDIT: Daniel Schierbeck
|
|
766
767
|
</p>
|
767
768
|
</div>
|
768
769
|
<div class="sourcecode">
|
769
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
770
|
-
<div id="
|
770
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">+</a> ]</p>
|
771
|
+
<div id="M000117_source" class="dyn-source">
|
771
772
|
<pre>
|
772
773
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 42</span>
|
773
774
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_values_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
@@ -779,7 +780,7 @@ CREDIT: Daniel Schierbeck
|
|
779
780
|
</div>
|
780
781
|
<div class="method">
|
781
782
|
<div class="title">
|
782
|
-
<a name="
|
783
|
+
<a name="M000110"></a><b>diff</b>(hash)
|
783
784
|
</div>
|
784
785
|
<div class="description">
|
785
786
|
<p>
|
@@ -787,8 +788,8 @@ Difference comparison of two hashes.
|
|
787
788
|
</p>
|
788
789
|
</div>
|
789
790
|
<div class="sourcecode">
|
790
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
791
|
-
<div id="
|
791
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">+</a> ]</p>
|
792
|
+
<div id="M000110_source" class="dyn-source">
|
792
793
|
<pre>
|
793
794
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/diff.rb, line 5</span>
|
794
795
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">hash</span>)
|
@@ -802,7 +803,7 @@ Difference comparison of two hashes.
|
|
802
803
|
</div>
|
803
804
|
<div class="method">
|
804
805
|
<div class="title">
|
805
|
-
<a name="
|
806
|
+
<a name="M000094"></a><b>each_with_key</b>( &yld )
|
806
807
|
</div>
|
807
808
|
<div class="description">
|
808
809
|
<p>
|
@@ -814,8 +815,8 @@ CREDIT: Trans
|
|
814
815
|
</p>
|
815
816
|
</div>
|
816
817
|
<div class="sourcecode">
|
817
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
818
|
-
<div id="
|
818
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">+</a> ]</p>
|
819
|
+
<div id="M000094_source" class="dyn-source">
|
819
820
|
<pre>
|
820
821
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 40</span>
|
821
822
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_with_key</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span> )
|
@@ -827,7 +828,7 @@ CREDIT: Trans
|
|
827
828
|
</div>
|
828
829
|
<div class="method">
|
829
830
|
<div class="title">
|
830
|
-
<a name="
|
831
|
+
<a name="M000088"></a><b>except</b>(*less_keys)
|
831
832
|
</div>
|
832
833
|
<div class="description">
|
833
834
|
<p>
|
@@ -835,8 +836,8 @@ Returns a new hash less the given keys.
|
|
835
836
|
</p>
|
836
837
|
</div>
|
837
838
|
<div class="sourcecode">
|
838
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
839
|
-
<div id="
|
839
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">+</a> ]</p>
|
840
|
+
<div id="M000088_source" class="dyn-source">
|
840
841
|
<pre>
|
841
842
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/except.rb, line 5</span>
|
842
843
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">except</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">less_keys</span>)
|
@@ -848,7 +849,7 @@ Returns a new hash less the given keys.
|
|
848
849
|
</div>
|
849
850
|
<div class="method">
|
850
851
|
<div class="title">
|
851
|
-
<a name="
|
852
|
+
<a name="M000089"></a><b>except!</b>(*less_keys)
|
852
853
|
</div>
|
853
854
|
<div class="description">
|
854
855
|
<p>
|
@@ -862,8 +863,8 @@ keys removed.
|
|
862
863
|
</pre>
|
863
864
|
</div>
|
864
865
|
<div class="sourcecode">
|
865
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
866
|
-
<div id="
|
866
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">+</a> ]</p>
|
867
|
+
<div id="M000089_source" class="dyn-source">
|
867
868
|
<pre>
|
868
869
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/except.rb, line 18</span>
|
869
870
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">except!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">less_keys</span>)
|
@@ -877,7 +878,7 @@ keys removed.
|
|
877
878
|
</div>
|
878
879
|
<div class="method">
|
879
880
|
<div class="title">
|
880
|
-
<a name="
|
881
|
+
<a name="M000112"></a><b>graph!</b>(&yld)
|
881
882
|
</div>
|
882
883
|
<div class="description">
|
883
884
|
<p>
|
@@ -887,7 +888,7 @@ Alias for mash!
|
|
887
888
|
</div>
|
888
889
|
<div class="method">
|
889
890
|
<div class="title">
|
890
|
-
<a name="
|
891
|
+
<a name="M000126"></a><b>group_by_value</b>()
|
891
892
|
</div>
|
892
893
|
<div class="description">
|
893
894
|
<p>
|
@@ -945,8 +946,8 @@ CREDIT: Erik Veenstra
|
|
945
946
|
</p>
|
946
947
|
</div>
|
947
948
|
<div class="sourcecode">
|
948
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
949
|
-
<div id="
|
949
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">+</a> ]</p>
|
950
|
+
<div id="M000126_source" class="dyn-source">
|
950
951
|
<pre>
|
951
952
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/group_by_value.rb, line 42</span>
|
952
953
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group_by_value</span>
|
@@ -960,7 +961,7 @@ CREDIT: Erik Veenstra
|
|
960
961
|
</div>
|
961
962
|
<div class="method">
|
962
963
|
<div class="title">
|
963
|
-
<a name="
|
964
|
+
<a name="M000090"></a><b>has_keys?</b>(*check_keys)
|
964
965
|
</div>
|
965
966
|
<div class="description">
|
966
967
|
<p>
|
@@ -977,11 +978,11 @@ CREDIT: Trans
|
|
977
978
|
</div>
|
978
979
|
<div class="aka">
|
979
980
|
This method is also aliased as
|
980
|
-
<a href="Hash.html#
|
981
|
+
<a href="Hash.html#M000091">keys?</a>
|
981
982
|
</div>
|
982
983
|
<div class="sourcecode">
|
983
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
984
|
-
<div id="
|
984
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">+</a> ]</p>
|
985
|
+
<div id="M000090_source" class="dyn-source">
|
985
986
|
<pre>
|
986
987
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 12</span>
|
987
988
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
@@ -994,7 +995,7 @@ CREDIT: Trans
|
|
994
995
|
</div>
|
995
996
|
<div class="method">
|
996
997
|
<div class="title">
|
997
|
-
<a name="
|
998
|
+
<a name="M000092"></a><b>has_only_keys?</b>(*check_keys)
|
998
999
|
</div>
|
999
1000
|
<div class="description">
|
1000
1001
|
<p>
|
@@ -1012,11 +1013,11 @@ CREDIT: Trans
|
|
1012
1013
|
</div>
|
1013
1014
|
<div class="aka">
|
1014
1015
|
This method is also aliased as
|
1015
|
-
<a href="Hash.html#
|
1016
|
+
<a href="Hash.html#M000093">only_keys?</a>
|
1016
1017
|
</div>
|
1017
1018
|
<div class="sourcecode">
|
1018
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1019
|
-
<div id="
|
1019
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">+</a> ]</p>
|
1020
|
+
<div id="M000092_source" class="dyn-source">
|
1020
1021
|
<pre>
|
1021
1022
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 28</span>
|
1022
1023
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_only_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
@@ -1029,7 +1030,7 @@ CREDIT: Trans
|
|
1029
1030
|
</div>
|
1030
1031
|
<div class="method">
|
1031
1032
|
<div class="title">
|
1032
|
-
<a name="
|
1033
|
+
<a name="M000108"></a><b>insert</b>(name, value)
|
1033
1034
|
</div>
|
1034
1035
|
<div class="description">
|
1035
1036
|
<p>
|
@@ -1043,8 +1044,8 @@ CREDIT: Trans
|
|
1043
1044
|
</p>
|
1044
1045
|
</div>
|
1045
1046
|
<div class="sourcecode">
|
1046
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1047
|
-
<div id="
|
1047
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source">+</a> ]</p>
|
1048
|
+
<div id="M000108_source" class="dyn-source">
|
1048
1049
|
<pre>
|
1049
1050
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/insert.rb, line 10</span>
|
1050
1051
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
@@ -1061,11 +1062,11 @@ CREDIT: Trans
|
|
1061
1062
|
</div>
|
1062
1063
|
<div class="method">
|
1063
1064
|
<div class="title">
|
1064
|
-
<a name="
|
1065
|
+
<a name="M000103"></a><b>inverse</b>()
|
1065
1066
|
</div>
|
1066
1067
|
<div class="description">
|
1067
1068
|
<p>
|
1068
|
-
Create a "true" <a href="Hash.html#
|
1069
|
+
Create a "true" <a href="Hash.html#M000103">inverse</a> hash by
|
1069
1070
|
storing mutliple values in Arrays.
|
1070
1071
|
</p>
|
1071
1072
|
<pre>
|
@@ -1081,8 +1082,8 @@ CREDIT: Tilo Sloboda
|
|
1081
1082
|
</p>
|
1082
1083
|
</div>
|
1083
1084
|
<div class="sourcecode">
|
1084
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1085
|
-
<div id="
|
1085
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">+</a> ]</p>
|
1086
|
+
<div id="M000103_source" class="dyn-source">
|
1086
1087
|
<pre>
|
1087
1088
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/inverse.rb, line 14</span>
|
1088
1089
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse</span>
|
@@ -1102,7 +1103,7 @@ CREDIT: Tilo Sloboda
|
|
1102
1103
|
</div>
|
1103
1104
|
<div class="method">
|
1104
1105
|
<div class="title">
|
1105
|
-
<a name="
|
1106
|
+
<a name="M000125"></a><b>join</b>(pair_divider='', elem_divider='')
|
1106
1107
|
</div>
|
1107
1108
|
<div class="description">
|
1108
1109
|
<p>
|
@@ -1113,8 +1114,8 @@ CREDIT: Mauricio Fernandez
|
|
1113
1114
|
</p>
|
1114
1115
|
</div>
|
1115
1116
|
<div class="sourcecode">
|
1116
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1117
|
-
<div id="
|
1117
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">+</a> ]</p>
|
1118
|
+
<div id="M000125_source" class="dyn-source">
|
1118
1119
|
<pre>
|
1119
1120
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/join.rb, line 7</span>
|
1120
1121
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>(<span class="ruby-identifier">pair_divider</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">elem_divider</span>=<span class="ruby-value str">''</span>)
|
@@ -1128,7 +1129,7 @@ CREDIT: Mauricio Fernandez
|
|
1128
1129
|
</div>
|
1129
1130
|
<div class="method">
|
1130
1131
|
<div class="title">
|
1131
|
-
<a name="
|
1132
|
+
<a name="M000091"></a><b>keys?</b>(*check_keys)
|
1132
1133
|
</div>
|
1133
1134
|
<div class="description">
|
1134
1135
|
<p>
|
@@ -1138,7 +1139,7 @@ Alias for has_keys?
|
|
1138
1139
|
</div>
|
1139
1140
|
<div class="method">
|
1140
1141
|
<div class="title">
|
1141
|
-
<a name="
|
1142
|
+
<a name="M000111"></a><b>mash!</b>(&yld)
|
1142
1143
|
</div>
|
1143
1144
|
<div class="description">
|
1144
1145
|
<p>
|
@@ -1151,11 +1152,11 @@ In place version of mash.
|
|
1151
1152
|
</div>
|
1152
1153
|
<div class="aka">
|
1153
1154
|
This method is also aliased as
|
1154
|
-
<a href="Hash.html#
|
1155
|
+
<a href="Hash.html#M000112">graph!</a>
|
1155
1156
|
</div>
|
1156
1157
|
<div class="sourcecode">
|
1157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1158
|
-
<div id="
|
1158
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">+</a> ]</p>
|
1159
|
+
<div id="M000111_source" class="dyn-source">
|
1159
1160
|
<pre>
|
1160
1161
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/mash.rb, line 10</span>
|
1161
1162
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mash!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
@@ -1167,7 +1168,7 @@ In place version of mash.
|
|
1167
1168
|
</div>
|
1168
1169
|
<div class="method">
|
1169
1170
|
<div class="title">
|
1170
|
-
<a name="
|
1171
|
+
<a name="M000093"></a><b>only_keys?</b>(*check_keys)
|
1171
1172
|
</div>
|
1172
1173
|
<div class="description">
|
1173
1174
|
<p>
|
@@ -1177,17 +1178,17 @@ Alias for has_only_keys?
|
|
1177
1178
|
</div>
|
1178
1179
|
<div class="method">
|
1179
1180
|
<div class="title">
|
1180
|
-
<a name="
|
1181
|
+
<a name="M000104"></a><b>recursive_merge</b>(other)
|
1181
1182
|
</div>
|
1182
1183
|
<div class="description">
|
1183
1184
|
<p>
|
1184
|
-
Same as Hash#merge but <a href="Hash.html#
|
1185
|
+
Same as Hash#merge but <a href="Hash.html#M000084">recursively</a> merges
|
1185
1186
|
sub-hashes.
|
1186
1187
|
</p>
|
1187
1188
|
</div>
|
1188
1189
|
<div class="sourcecode">
|
1189
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1190
|
-
<div id="
|
1190
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">+</a> ]</p>
|
1191
|
+
<div id="M000104_source" class="dyn-source">
|
1191
1192
|
<pre>
|
1192
1193
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursive_merge.rb, line 5</span>
|
1193
1194
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursive_merge</span>(<span class="ruby-identifier">other</span>)
|
@@ -1208,17 +1209,17 @@ sub-hashes.
|
|
1208
1209
|
</div>
|
1209
1210
|
<div class="method">
|
1210
1211
|
<div class="title">
|
1211
|
-
<a name="
|
1212
|
+
<a name="M000105"></a><b>recursive_merge!</b>(other)
|
1212
1213
|
</div>
|
1213
1214
|
<div class="description">
|
1214
1215
|
<p>
|
1215
|
-
Same as Hash#merge! but <a href="Hash.html#
|
1216
|
+
Same as Hash#merge! but <a href="Hash.html#M000084">recursively</a> merges
|
1216
1217
|
sub-hashes.
|
1217
1218
|
</p>
|
1218
1219
|
</div>
|
1219
1220
|
<div class="sourcecode">
|
1220
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1221
|
-
<div id="
|
1221
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">+</a> ]</p>
|
1222
|
+
<div id="M000105_source" class="dyn-source">
|
1222
1223
|
<pre>
|
1223
1224
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursive_merge.rb, line 20</span>
|
1224
1225
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursive_merge!</span>(<span class="ruby-identifier">other</span>)
|
@@ -1238,11 +1239,11 @@ sub-hashes.
|
|
1238
1239
|
</div>
|
1239
1240
|
<div class="method">
|
1240
1241
|
<div class="title">
|
1241
|
-
<a name="
|
1242
|
+
<a name="M000084"></a><b>recursively</b>() {|h| ...}
|
1242
1243
|
</div>
|
1243
1244
|
<div class="description">
|
1244
1245
|
<p>
|
1245
|
-
Apply a block to hash, and <a href="Hash.html#
|
1246
|
+
Apply a block to hash, and <a href="Hash.html#M000084">recursively</a>
|
1246
1247
|
apply that block to each subhash.
|
1247
1248
|
</p>
|
1248
1249
|
<pre>
|
@@ -1252,8 +1253,8 @@ apply that block to each subhash.
|
|
1252
1253
|
</pre>
|
1253
1254
|
</div>
|
1254
1255
|
<div class="sourcecode">
|
1255
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1256
|
-
<div id="
|
1256
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">+</a> ]</p>
|
1257
|
+
<div id="M000084_source" class="dyn-source">
|
1257
1258
|
<pre>
|
1258
1259
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursively.rb, line 10</span>
|
1259
1260
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursively</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1273,11 +1274,11 @@ apply that block to each subhash.
|
|
1273
1274
|
</div>
|
1274
1275
|
<div class="method">
|
1275
1276
|
<div class="title">
|
1276
|
-
<a name="
|
1277
|
+
<a name="M000085"></a><b>recursively!</b>(&block)
|
1277
1278
|
</div>
|
1278
1279
|
<div class="sourcecode">
|
1279
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1280
|
-
<div id="
|
1280
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">+</a> ]</p>
|
1281
|
+
<div id="M000085_source" class="dyn-source">
|
1281
1282
|
<pre>
|
1282
1283
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursively.rb, line 24</span>
|
1283
1284
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursively!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1289,7 +1290,7 @@ apply that block to each subhash.
|
|
1289
1290
|
</div>
|
1290
1291
|
<div class="method">
|
1291
1292
|
<div class="title">
|
1292
|
-
<a name="
|
1293
|
+
<a name="M000131"></a><b>rekey</b>(*args, &block)
|
1293
1294
|
</div>
|
1294
1295
|
<div class="description">
|
1295
1296
|
<p>
|
@@ -1328,8 +1329,8 @@ CREDIT: Trans, Gavin Kistner
|
|
1328
1329
|
</p>
|
1329
1330
|
</div>
|
1330
1331
|
<div class="sourcecode">
|
1331
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1332
|
-
<div id="
|
1332
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000131_source')" id="l_M000131_source">+</a> ]</p>
|
1333
|
+
<div id="M000131_source" class="dyn-source">
|
1333
1334
|
<pre>
|
1334
1335
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line 32</span>
|
1335
1336
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rekey</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1341,11 +1342,11 @@ CREDIT: Trans, Gavin Kistner
|
|
1341
1342
|
</div>
|
1342
1343
|
<div class="method">
|
1343
1344
|
<div class="title">
|
1344
|
-
<a name="
|
1345
|
+
<a name="M000132"></a><b>rekey!</b>(*args, &block)
|
1345
1346
|
</div>
|
1346
1347
|
<div class="description">
|
1347
1348
|
<p>
|
1348
|
-
Synonym for <a href="Hash.html#
|
1349
|
+
Synonym for <a href="Hash.html#M000131">Hash#rekey</a>, but modifies the
|
1349
1350
|
receiver in place (and returns it).
|
1350
1351
|
</p>
|
1351
1352
|
<pre>
|
@@ -1358,8 +1359,8 @@ CREDIT: Trans, Gavin Kistner
|
|
1358
1359
|
</p>
|
1359
1360
|
</div>
|
1360
1361
|
<div class="sourcecode">
|
1361
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1362
|
-
<div id="
|
1362
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000132_source')" id="l_M000132_source">+</a> ]</p>
|
1363
|
+
<div id="M000132_source" class="dyn-source">
|
1363
1364
|
<pre>
|
1364
1365
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line 44</span>
|
1365
1366
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rekey!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1385,11 +1386,11 @@ CREDIT: Trans, Gavin Kistner
|
|
1385
1386
|
</div>
|
1386
1387
|
<div class="method">
|
1387
1388
|
<div class="title">
|
1388
|
-
<a name="
|
1389
|
+
<a name="M000127"></a><b>replace_each</b>( {|| ...}
|
1389
1390
|
</div>
|
1390
1391
|
<div class="description">
|
1391
1392
|
<p>
|
1392
|
-
Same as <a href="Hash.html#
|
1393
|
+
Same as <a href="Hash.html#M000133">update_each</a>, but deletes the key
|
1393
1394
|
element first.
|
1394
1395
|
</p>
|
1395
1396
|
<p>
|
@@ -1397,8 +1398,8 @@ CREDIT: Trans
|
|
1397
1398
|
</p>
|
1398
1399
|
</div>
|
1399
1400
|
<div class="sourcecode">
|
1400
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1401
|
-
<div id="
|
1401
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000127_source')" id="l_M000127_source">+</a> ]</p>
|
1402
|
+
<div id="M000127_source" class="dyn-source">
|
1402
1403
|
<pre>
|
1403
1404
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/replace_each.rb, line 7</span>
|
1404
1405
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
@@ -1414,7 +1415,7 @@ CREDIT: Trans
|
|
1414
1415
|
</div>
|
1415
1416
|
<div class="method">
|
1416
1417
|
<div class="title">
|
1417
|
-
<a name="
|
1418
|
+
<a name="M000095"></a><b>reverse_merge</b>(other)
|
1418
1419
|
</div>
|
1419
1420
|
<div class="description">
|
1420
1421
|
<p>
|
@@ -1433,8 +1434,8 @@ in doesn‘t already have those keys set.
|
|
1433
1434
|
</p>
|
1434
1435
|
</div>
|
1435
1436
|
<div class="sourcecode">
|
1436
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1437
|
-
<div id="
|
1437
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">+</a> ]</p>
|
1438
|
+
<div id="M000095_source" class="dyn-source">
|
1438
1439
|
<pre>
|
1439
1440
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/merge.rb, line 15</span>
|
1440
1441
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reverse_merge</span>(<span class="ruby-identifier">other</span>)
|
@@ -1446,20 +1447,20 @@ in doesn‘t already have those keys set.
|
|
1446
1447
|
</div>
|
1447
1448
|
<div class="method">
|
1448
1449
|
<div class="title">
|
1449
|
-
<a name="
|
1450
|
+
<a name="M000096"></a><b>reverse_merge!</b>(other)
|
1450
1451
|
</div>
|
1451
1452
|
<div class="description">
|
1452
1453
|
<p>
|
1453
|
-
Inplace form of <a href="Hash.html#
|
1454
|
+
Inplace form of <a href="Hash.html#M000095">reverse_merge</a>.
|
1454
1455
|
</p>
|
1455
1456
|
</div>
|
1456
1457
|
<div class="aka">
|
1457
1458
|
This method is also aliased as
|
1458
|
-
<a href="Hash.html#
|
1459
|
+
<a href="Hash.html#M000097">reverse_update</a>
|
1459
1460
|
</div>
|
1460
1461
|
<div class="sourcecode">
|
1461
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1462
|
-
<div id="
|
1462
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">+</a> ]</p>
|
1463
|
+
<div id="M000096_source" class="dyn-source">
|
1463
1464
|
<pre>
|
1464
1465
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/merge.rb, line 21</span>
|
1465
1466
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-identifier">other</span>)
|
@@ -1471,17 +1472,17 @@ Inplace form of <a href="Hash.html#M000123">reverse_merge</a>.
|
|
1471
1472
|
</div>
|
1472
1473
|
<div class="method">
|
1473
1474
|
<div class="title">
|
1474
|
-
<a name="
|
1475
|
+
<a name="M000097"></a><b>reverse_update</b>(other)
|
1475
1476
|
</div>
|
1476
1477
|
<div class="description">
|
1477
1478
|
<p>
|
1478
|
-
Alias for <a href="Hash.html#
|
1479
|
+
Alias for <a href="Hash.html#M000095">reverse_merge</a>!
|
1479
1480
|
</p>
|
1480
1481
|
</div>
|
1481
1482
|
</div>
|
1482
1483
|
<div class="method">
|
1483
1484
|
<div class="title">
|
1484
|
-
<a name="
|
1485
|
+
<a name="M000109"></a><b>select!</b>() {|k,v| ...}
|
1485
1486
|
</div>
|
1486
1487
|
<div class="description">
|
1487
1488
|
<p>
|
@@ -1492,8 +1493,8 @@ CREDIT: Gavin Sinclair, Noah Gibbs
|
|
1492
1493
|
</p>
|
1493
1494
|
</div>
|
1494
1495
|
<div class="sourcecode">
|
1495
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1496
|
-
<div id="
|
1496
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">+</a> ]</p>
|
1497
|
+
<div id="M000109_source" class="dyn-source">
|
1497
1498
|
<pre>
|
1498
1499
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/select.rb, line 8</span>
|
1499
1500
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select!</span>
|
@@ -1505,7 +1506,7 @@ CREDIT: Gavin Sinclair, Noah Gibbs
|
|
1505
1506
|
</div>
|
1506
1507
|
<div class="method">
|
1507
1508
|
<div class="title">
|
1508
|
-
<a name="
|
1509
|
+
<a name="M000128"></a><b>slice</b>(*keep_keys)
|
1509
1510
|
</div>
|
1510
1511
|
<div class="description">
|
1511
1512
|
<p>
|
@@ -1513,8 +1514,8 @@ Returns a new hash with only the given keys.
|
|
1513
1514
|
</p>
|
1514
1515
|
</div>
|
1515
1516
|
<div class="sourcecode">
|
1516
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1517
|
-
<div id="
|
1517
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000128_source')" id="l_M000128_source">+</a> ]</p>
|
1518
|
+
<div id="M000128_source" class="dyn-source">
|
1518
1519
|
<pre>
|
1519
1520
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/slice.rb, line 9</span>
|
1520
1521
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slice</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keep_keys</span>)
|
@@ -1530,7 +1531,7 @@ Returns a new hash with only the given keys.
|
|
1530
1531
|
</div>
|
1531
1532
|
<div class="method">
|
1532
1533
|
<div class="title">
|
1533
|
-
<a name="
|
1534
|
+
<a name="M000129"></a><b>slice!</b>(*keep_keys)
|
1534
1535
|
</div>
|
1535
1536
|
<div class="description">
|
1536
1537
|
<p>
|
@@ -1544,8 +1545,8 @@ hash of keys removed.
|
|
1544
1545
|
</pre>
|
1545
1546
|
</div>
|
1546
1547
|
<div class="sourcecode">
|
1547
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1548
|
-
<div id="
|
1548
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">+</a> ]</p>
|
1549
|
+
<div id="M000129_source" class="dyn-source">
|
1549
1550
|
<pre>
|
1550
1551
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/slice.rb, line 24</span>
|
1551
1552
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slice!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keep_keys</span>)
|
@@ -1559,7 +1560,7 @@ hash of keys removed.
|
|
1559
1560
|
</div>
|
1560
1561
|
<div class="method">
|
1561
1562
|
<div class="title">
|
1562
|
-
<a name="
|
1563
|
+
<a name="M000123"></a><b>stringify_keys</b>(&filter)
|
1563
1564
|
</div>
|
1564
1565
|
<div class="description">
|
1565
1566
|
<p>
|
@@ -1574,12 +1575,12 @@ limits conversion to only a certain selection of keys.
|
|
1574
1575
|
</pre>
|
1575
1576
|
<p>
|
1576
1577
|
This method is considered archaic. Use <a
|
1577
|
-
href="Hash.html#
|
1578
|
+
href="Hash.html#M000131">rekey</a> instead.
|
1578
1579
|
</p>
|
1579
1580
|
</div>
|
1580
1581
|
<div class="sourcecode">
|
1581
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1582
|
-
<div id="
|
1582
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">+</a> ]</p>
|
1583
|
+
<div id="M000123_source" class="dyn-source">
|
1583
1584
|
<pre>
|
1584
1585
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 54</span>
|
1585
1586
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
@@ -1595,11 +1596,11 @@ href="Hash.html#M000159">rekey</a> instead.
|
|
1595
1596
|
</div>
|
1596
1597
|
<div class="method">
|
1597
1598
|
<div class="title">
|
1598
|
-
<a name="
|
1599
|
+
<a name="M000124"></a><b>stringify_keys!</b>(&filter)
|
1599
1600
|
</div>
|
1600
1601
|
<div class="description">
|
1601
1602
|
<p>
|
1602
|
-
Synonym for <a href="Hash.html#
|
1603
|
+
Synonym for <a href="Hash.html#M000123">Hash#stringify_keys</a>, but
|
1603
1604
|
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
1604
1605
|
parameter, limits conversion to only a certain selection of keys.
|
1605
1606
|
</p>
|
@@ -1610,12 +1611,12 @@ parameter, limits conversion to only a certain selection of keys.
|
|
1610
1611
|
</pre>
|
1611
1612
|
<p>
|
1612
1613
|
This method is considered archaic. Use <a
|
1613
|
-
href="Hash.html#
|
1614
|
+
href="Hash.html#M000131">rekey</a> instead.
|
1614
1615
|
</p>
|
1615
1616
|
</div>
|
1616
1617
|
<div class="sourcecode">
|
1617
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1618
|
-
<div id="
|
1618
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">+</a> ]</p>
|
1619
|
+
<div id="M000124_source" class="dyn-source">
|
1619
1620
|
<pre>
|
1620
1621
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 73</span>
|
1621
1622
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
@@ -1631,7 +1632,7 @@ href="Hash.html#M000159">rekey</a> instead.
|
|
1631
1632
|
</div>
|
1632
1633
|
<div class="method">
|
1633
1634
|
<div class="title">
|
1634
|
-
<a name="
|
1635
|
+
<a name="M000119"></a><b>swap!</b>(key1, key2)
|
1635
1636
|
</div>
|
1636
1637
|
<div class="description">
|
1637
1638
|
<p>
|
@@ -1645,8 +1646,8 @@ CREDIT: Gavin Sinclair
|
|
1645
1646
|
</p>
|
1646
1647
|
</div>
|
1647
1648
|
<div class="sourcecode">
|
1648
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1649
|
-
<div id="
|
1649
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">+</a> ]</p>
|
1650
|
+
<div id="M000119_source" class="dyn-source">
|
1650
1651
|
<pre>
|
1651
1652
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/swap.rb, line 9</span>
|
1652
1653
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">swap!</span>(<span class="ruby-identifier">key1</span>, <span class="ruby-identifier">key2</span>)
|
@@ -1661,7 +1662,7 @@ CREDIT: Gavin Sinclair
|
|
1661
1662
|
</div>
|
1662
1663
|
<div class="method">
|
1663
1664
|
<div class="title">
|
1664
|
-
<a name="
|
1665
|
+
<a name="M000121"></a><b>symbolize_keys</b>(&filter)
|
1665
1666
|
</div>
|
1666
1667
|
<div class="description">
|
1667
1668
|
<p>
|
@@ -1676,12 +1677,12 @@ conversion to only a certain selection of keys.
|
|
1676
1677
|
</pre>
|
1677
1678
|
<p>
|
1678
1679
|
This method is considered archaic. Use <a
|
1679
|
-
href="Hash.html#
|
1680
|
+
href="Hash.html#M000131">rekey</a> instead.
|
1680
1681
|
</p>
|
1681
1682
|
</div>
|
1682
1683
|
<div class="sourcecode">
|
1683
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1684
|
-
<div id="
|
1684
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">+</a> ]</p>
|
1685
|
+
<div id="M000121_source" class="dyn-source">
|
1685
1686
|
<pre>
|
1686
1687
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 20</span>
|
1687
1688
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
@@ -1697,11 +1698,11 @@ href="Hash.html#M000159">rekey</a> instead.
|
|
1697
1698
|
</div>
|
1698
1699
|
<div class="method">
|
1699
1700
|
<div class="title">
|
1700
|
-
<a name="
|
1701
|
+
<a name="M000122"></a><b>symbolize_keys!</b>(&filter)
|
1701
1702
|
</div>
|
1702
1703
|
<div class="description">
|
1703
1704
|
<p>
|
1704
|
-
Synonym for <a href="Hash.html#
|
1705
|
+
Synonym for <a href="Hash.html#M000121">Hash#symbolize_keys</a>, but
|
1705
1706
|
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
1706
1707
|
parameter, limits conversion to only a certain selection of keys.
|
1707
1708
|
</p>
|
@@ -1712,12 +1713,12 @@ parameter, limits conversion to only a certain selection of keys.
|
|
1712
1713
|
</pre>
|
1713
1714
|
<p>
|
1714
1715
|
This method is considered archaic. Use <a
|
1715
|
-
href="Hash.html#
|
1716
|
+
href="Hash.html#M000131">rekey</a> instead.
|
1716
1717
|
</p>
|
1717
1718
|
</div>
|
1718
1719
|
<div class="sourcecode">
|
1719
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1720
|
-
<div id="
|
1720
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">+</a> ]</p>
|
1721
|
+
<div id="M000122_source" class="dyn-source">
|
1721
1722
|
<pre>
|
1722
1723
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 37</span>
|
1723
1724
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
@@ -1733,7 +1734,7 @@ href="Hash.html#M000159">rekey</a> instead.
|
|
1733
1734
|
</div>
|
1734
1735
|
<div class="method">
|
1735
1736
|
<div class="title">
|
1736
|
-
<a name="
|
1737
|
+
<a name="M000075"></a><b>to_h</b>()
|
1737
1738
|
</div>
|
1738
1739
|
<div class="description">
|
1739
1740
|
<p>
|
@@ -1747,10 +1748,10 @@ CREDIT: Forian Gross
|
|
1747
1748
|
</p>
|
1748
1749
|
</div>
|
1749
1750
|
<div class="sourcecode">
|
1750
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1751
|
-
<div id="
|
1751
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">+</a> ]</p>
|
1752
|
+
<div id="M000075_source" class="dyn-source">
|
1752
1753
|
<pre>
|
1753
|
-
<span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line
|
1754
|
+
<span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 209</span>
|
1754
1755
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>; <span class="ruby-identifier">rehash</span>; <span class="ruby-keyword kw">end</span>
|
1755
1756
|
</pre>
|
1756
1757
|
</div>
|
@@ -1758,7 +1759,29 @@ CREDIT: Forian Gross
|
|
1758
1759
|
</div>
|
1759
1760
|
<div class="method">
|
1760
1761
|
<div class="title">
|
1761
|
-
<a name="
|
1762
|
+
<a name="M000076"></a><b>to_hash</b>()
|
1763
|
+
</div>
|
1764
|
+
<div class="description">
|
1765
|
+
<p>
|
1766
|
+
Returns <em>self</em>.
|
1767
|
+
</p>
|
1768
|
+
<p>
|
1769
|
+
CREDIT: Trans
|
1770
|
+
</p>
|
1771
|
+
</div>
|
1772
|
+
<div class="sourcecode">
|
1773
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">+</a> ]</p>
|
1774
|
+
<div id="M000076_source" class="dyn-source">
|
1775
|
+
<pre>
|
1776
|
+
<span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 215</span>
|
1777
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hash</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>
|
1778
|
+
</pre>
|
1779
|
+
</div>
|
1780
|
+
</div>
|
1781
|
+
</div>
|
1782
|
+
<div class="method">
|
1783
|
+
<div class="title">
|
1784
|
+
<a name="M000106"></a><b>to_proc</b>()
|
1762
1785
|
</div>
|
1763
1786
|
<div class="description">
|
1764
1787
|
<p>
|
@@ -1778,8 +1801,8 @@ CREDIT: Trans
|
|
1778
1801
|
</p>
|
1779
1802
|
</div>
|
1780
1803
|
<div class="sourcecode">
|
1781
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1782
|
-
<div id="
|
1804
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">+</a> ]</p>
|
1805
|
+
<div id="M000106_source" class="dyn-source">
|
1783
1806
|
<pre>
|
1784
1807
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_proc.rb, line 15</span>
|
1785
1808
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
|
@@ -1796,14 +1819,14 @@ CREDIT: Trans
|
|
1796
1819
|
</div>
|
1797
1820
|
<div class="method">
|
1798
1821
|
<div class="title">
|
1799
|
-
<a name="
|
1822
|
+
<a name="M000107"></a><b>to_proc_with_reponse</b>()
|
1800
1823
|
</div>
|
1801
1824
|
<div class="description">
|
1802
1825
|
<p>
|
1803
|
-
A fault-tolerent version of <a href="Hash.html#
|
1826
|
+
A fault-tolerent version of <a href="Hash.html#M000106">to_proc</a>.
|
1804
1827
|
</p>
|
1805
1828
|
<p>
|
1806
|
-
It works just like <a href="Hash.html#
|
1829
|
+
It works just like <a href="Hash.html#M000106">to_proc</a>, but the block
|
1807
1830
|
will make sure# the object responds to the assignment.
|
1808
1831
|
</p>
|
1809
1832
|
<p>
|
@@ -1811,8 +1834,8 @@ CREDIT: Trans
|
|
1811
1834
|
</p>
|
1812
1835
|
</div>
|
1813
1836
|
<div class="sourcecode">
|
1814
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1815
|
-
<div id="
|
1837
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">+</a> ]</p>
|
1838
|
+
<div id="M000107_source" class="dyn-source">
|
1816
1839
|
<pre>
|
1817
1840
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_proc.rb, line 31</span>
|
1818
1841
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc_with_reponse</span>
|
@@ -1829,7 +1852,7 @@ CREDIT: Trans
|
|
1829
1852
|
</div>
|
1830
1853
|
<div class="method">
|
1831
1854
|
<div class="title">
|
1832
|
-
<a name="
|
1855
|
+
<a name="M000120"></a><b>to_struct</b>(struct_name)
|
1833
1856
|
</div>
|
1834
1857
|
<div class="description">
|
1835
1858
|
<p>
|
@@ -1848,8 +1871,8 @@ CREDIT: Daniel Berger
|
|
1848
1871
|
</p>
|
1849
1872
|
</div>
|
1850
1873
|
<div class="sourcecode">
|
1851
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1852
|
-
<div id="
|
1874
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">+</a> ]</p>
|
1875
|
+
<div id="M000120_source" class="dyn-source">
|
1853
1876
|
<pre>
|
1854
1877
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_struct.rb, line 12</span>
|
1855
1878
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_struct</span>(<span class="ruby-identifier">struct_name</span>)
|
@@ -1861,7 +1884,7 @@ CREDIT: Daniel Berger
|
|
1861
1884
|
</div>
|
1862
1885
|
<div class="method">
|
1863
1886
|
<div class="title">
|
1864
|
-
<a name="
|
1887
|
+
<a name="M000098"></a><b>traverse</b>(&b)
|
1865
1888
|
</div>
|
1866
1889
|
<div class="description">
|
1867
1890
|
<p>
|
@@ -1889,8 +1912,8 @@ CREDIT: Trans
|
|
1889
1912
|
</p>
|
1890
1913
|
</div>
|
1891
1914
|
<div class="sourcecode">
|
1892
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1893
|
-
<div id="
|
1915
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">+</a> ]</p>
|
1916
|
+
<div id="M000098_source" class="dyn-source">
|
1894
1917
|
<pre>
|
1895
1918
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/traverse.rb, line 18</span>
|
1896
1919
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -1907,11 +1930,11 @@ CREDIT: Trans
|
|
1907
1930
|
</div>
|
1908
1931
|
<div class="method">
|
1909
1932
|
<div class="title">
|
1910
|
-
<a name="
|
1933
|
+
<a name="M000099"></a><b>traverse!</b>(&b)
|
1911
1934
|
</div>
|
1912
1935
|
<div class="description">
|
1913
1936
|
<p>
|
1914
|
-
In place version of <a href="Hash.html#
|
1937
|
+
In place version of <a href="Hash.html#M000098">traverse</a>, which
|
1915
1938
|
traverses the hash and its subhashes, executing the given block on the key
|
1916
1939
|
and value.
|
1917
1940
|
</p>
|
@@ -1925,8 +1948,8 @@ CREDIT: Trans
|
|
1925
1948
|
</p>
|
1926
1949
|
</div>
|
1927
1950
|
<div class="sourcecode">
|
1928
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1929
|
-
<div id="
|
1951
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000099_source')" id="l_M000099_source">+</a> ]</p>
|
1952
|
+
<div id="M000099_source" class="dyn-source">
|
1930
1953
|
<pre>
|
1931
1954
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/traverse.rb, line 36</span>
|
1932
1955
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -1938,13 +1961,13 @@ CREDIT: Trans
|
|
1938
1961
|
</div>
|
1939
1962
|
<div class="method">
|
1940
1963
|
<div class="title">
|
1941
|
-
<a name="
|
1964
|
+
<a name="M000133"></a><b>update_each</b>( {|| ...}
|
1942
1965
|
</div>
|
1943
1966
|
<div class="description">
|
1944
1967
|
<p>
|
1945
1968
|
Iterates through each pair and updates a the hash in place. This is
|
1946
1969
|
formally equivalent to mash! But does not use mash to accomplish the task.
|
1947
|
-
Hence <a href="Hash.html#
|
1970
|
+
Hence <a href="Hash.html#M000133">update_each</a> is probably a touch
|
1948
1971
|
faster.
|
1949
1972
|
</p>
|
1950
1973
|
<p>
|
@@ -1952,8 +1975,8 @@ CREDIT: Trans
|
|
1952
1975
|
</p>
|
1953
1976
|
</div>
|
1954
1977
|
<div class="sourcecode">
|
1955
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1956
|
-
<div id="
|
1978
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000133_source')" id="l_M000133_source">+</a> ]</p>
|
1979
|
+
<div id="M000133_source" class="dyn-source">
|
1957
1980
|
<pre>
|
1958
1981
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_each.rb, line 10</span>
|
1959
1982
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
@@ -1968,7 +1991,7 @@ CREDIT: Trans
|
|
1968
1991
|
</div>
|
1969
1992
|
<div class="method">
|
1970
1993
|
<div class="title">
|
1971
|
-
<a name="
|
1994
|
+
<a name="M000134"></a><b>update_keys</b>( {|| ...}
|
1972
1995
|
</div>
|
1973
1996
|
<div class="description">
|
1974
1997
|
<p>
|
@@ -1984,8 +2007,8 @@ CREDIT: Trans
|
|
1984
2007
|
</p>
|
1985
2008
|
</div>
|
1986
2009
|
<div class="sourcecode">
|
1987
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1988
|
-
<div id="
|
2010
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000134_source')" id="l_M000134_source">+</a> ]</p>
|
2011
|
+
<div id="M000134_source" class="dyn-source">
|
1989
2012
|
<pre>
|
1990
2013
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_keys.rb, line 11</span>
|
1991
2014
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_keys</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -2001,7 +2024,7 @@ CREDIT: Trans
|
|
2001
2024
|
</div>
|
2002
2025
|
<div class="method">
|
2003
2026
|
<div class="title">
|
2004
|
-
<a name="
|
2027
|
+
<a name="M000081"></a><b>update_values</b>( {|| ...}
|
2005
2028
|
</div>
|
2006
2029
|
<div class="description">
|
2007
2030
|
<p>
|
@@ -2017,8 +2040,8 @@ CREDIT: Trans
|
|
2017
2040
|
</p>
|
2018
2041
|
</div>
|
2019
2042
|
<div class="sourcecode">
|
2020
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2021
|
-
<div id="
|
2043
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">+</a> ]</p>
|
2044
|
+
<div id="M000081_source" class="dyn-source">
|
2022
2045
|
<pre>
|
2023
2046
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_values.rb, line 11</span>
|
2024
2047
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_values</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -2034,7 +2057,7 @@ CREDIT: Trans
|
|
2034
2057
|
</div>
|
2035
2058
|
<div class="method">
|
2036
2059
|
<div class="title">
|
2037
|
-
<a name="
|
2060
|
+
<a name="M000118"></a><b>weave</b>(h)
|
2038
2061
|
</div>
|
2039
2062
|
<div class="description">
|
2040
2063
|
<p>
|
@@ -2081,8 +2104,8 @@ CREDIT: Thomas Sawyer
|
|
2081
2104
|
</p>
|
2082
2105
|
</div>
|
2083
2106
|
<div class="sourcecode">
|
2084
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2085
|
-
<div id="
|
2107
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">+</a> ]</p>
|
2108
|
+
<div id="M000118_source" class="dyn-source">
|
2086
2109
|
<pre>
|
2087
2110
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/weave.rb, line 40</span>
|
2088
2111
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weave</span>(<span class="ruby-identifier">h</span>)
|
@@ -2131,19 +2154,19 @@ CREDIT: Thomas Sawyer
|
|
2131
2154
|
</div>
|
2132
2155
|
<div class="method">
|
2133
2156
|
<div class="title">
|
2134
|
-
<a name="
|
2157
|
+
<a name="M000100"></a><b>|</b>(other)
|
2135
2158
|
</div>
|
2136
2159
|
<div class="description">
|
2137
2160
|
<p>
|
2138
|
-
Operator for <a href="Hash.html#
|
2161
|
+
Operator for <a href="Hash.html#M000095">reverse_merge</a>.
|
2139
2162
|
</p>
|
2140
2163
|
<p>
|
2141
2164
|
CREDIT: Trans
|
2142
2165
|
</p>
|
2143
2166
|
</div>
|
2144
2167
|
<div class="sourcecode">
|
2145
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2146
|
-
<div id="
|
2168
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">+</a> ]</p>
|
2169
|
+
<div id="M000100_source" class="dyn-source">
|
2147
2170
|
<pre>
|
2148
2171
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_or.rb, line 7</span>
|
2149
2172
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">|</span>(<span class="ruby-identifier">other</span>)
|