junk_drawer 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,13 +7,6 @@ class Array
7
7
  first
8
8
  end
9
9
 
10
- # Backport #select! from 1.9.
11
- if RUBY_VERSION < '1.9'
12
- def select!(&block)
13
- replace(select(&block))
14
- end
15
- end
16
-
17
10
  # For readability, especially after sorting.
18
11
  alias :highest :last
19
12
  alias :lowest :first
@@ -3,9 +3,14 @@ class Hash
3
3
  keys.each { |key| self[key] ||= '' }
4
4
  end
5
5
 
6
+ alias :need :needs
7
+
6
8
  def keeps(*checks)
7
9
  delete_if do |key, value|
8
10
  checks.none? { |check| check === key }
9
11
  end
10
12
  end
13
+
14
+ alias :keep :keeps
15
+ alias :whitelist :keeps
11
16
  end
@@ -1,3 +1,3 @@
1
1
  module JunkDrawer
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Chris Hanks
@@ -69,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- hash: 403581647
72
+ hash: 697772945
73
73
  segments:
74
74
  - 0
75
75
  version: "0"