kim 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README +4 -0
- data/README.md +4 -0
- data/lib/kim/hash.rb +4 -0
- data/lib/kim/version.rb +1 -1
- data/spec/hash/hash_spec.rb +4 -0
- metadata +4 -4
data/README
CHANGED
@@ -18,6 +18,10 @@ Provide multiple keys and it will tell you if they are contained in the current
|
|
18
18
|
|
19
19
|
Finds a value taking nesting into account
|
20
20
|
|
21
|
+
### select_keys
|
22
|
+
|
23
|
+
Receive a list of keys and return a hash subset containing the keys specified
|
24
|
+
|
21
25
|
Fixnum
|
22
26
|
------
|
23
27
|
|
data/README.md
CHANGED
@@ -18,6 +18,10 @@ Provide multiple keys and it will tell you if they are contained in the current
|
|
18
18
|
|
19
19
|
Finds a value taking nesting into account
|
20
20
|
|
21
|
+
### select_keys
|
22
|
+
|
23
|
+
Receive a list of keys and return a hash subset containing the keys specified
|
24
|
+
|
21
25
|
Fixnum
|
22
26
|
------
|
23
27
|
|
data/lib/kim/hash.rb
CHANGED
data/lib/kim/version.rb
CHANGED
data/spec/hash/hash_spec.rb
CHANGED
@@ -12,4 +12,8 @@ describe "Hash Additions" do
|
|
12
12
|
it "should merge a key only exists in other" do
|
13
13
|
{:a => {:aa => :c}}.deep_merge({:a=> {:ab => :c}, :b => {:ba => :c}}).should == {:a=> {:aa => :c, :ab => :c}, :b => {:ba => :c}}
|
14
14
|
end
|
15
|
+
|
16
|
+
it "should select keys from a hash, returning a new hash containing those keys" do
|
17
|
+
{:a => 1, :b => 2, :c => 3, :d => 4}.select_keys(:a,:b).should == {:a => 1, :b => 2}
|
18
|
+
end
|
15
19
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Giancarlo Palavicini
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-26 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec
|