hash-keys 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,14 @@
1
- #$:.push File.expand_path("../lib", __FILE__)
2
- #require "hash-keys/version"
3
-
4
1
  Gem::Specification.new do |s|
5
2
  s.name = 'hash-keys'
6
- s.version = '1.0.0'
7
- s.date = '2011-09-14'
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ['Lee Henson', 'Guy Boertje']
10
- s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
11
- s.homepage = ""
12
- s.summary = %q{}
13
- s.description = %q{}
14
- ## Leave this section as-is. It will be automatically generated from the
15
- ## contents of your Git repository via the gemspec task. DO NOT REMOVE
16
- ## THE MANIFEST COMMENTS, they are used as delimiters by the task.
3
+ s.version = '1.0.1'
4
+ s.date = '2011-10-04'
5
+ s.platform = Gem::Platform::RUBY
6
+ s.authors = ['Lee Henson', 'Guy Boertje']
7
+ s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
8
+ s.homepage = ""
9
+ s.summary = %q{}
10
+ s.description = %q{}
11
+
17
12
  # = MANIFEST =
18
13
  s.files = %w[
19
14
  Rakefile
@@ -23,7 +18,7 @@ Gem::Specification.new do |s|
23
18
  ]
24
19
  # = MANIFEST =
25
20
 
26
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
28
- s.require_paths = ["lib"]
21
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
+ s.require_paths = ["lib"]
29
24
  end
@@ -2,6 +2,10 @@ module HashKeys
2
2
  def has_keys?(*keys)
3
3
  !keys.any? { |key| !self.has_key? key }
4
4
  end
5
+
6
+ def extract *keys
7
+ select { |k, v| keys.include? k }
8
+ end
5
9
  end
6
10
 
7
11
  module HashKeysRmerge
@@ -1,3 +1,3 @@
1
1
  module HashKeys
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash-keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-14 00:00:00.000000000 Z
13
+ date: 2011-10-04 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: ''
16
16
  email:
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
44
44
  version: '0'
45
45
  requirements: []
46
46
  rubyforge_project:
47
- rubygems_version: 1.8.6
47
+ rubygems_version: 1.8.10
48
48
  signing_key:
49
49
  specification_version: 3
50
50
  summary: ''