hash_plus 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hash_plus.gemspec +1 -1
- data/lib/hash_plus.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b8089cb1816245c13ded8dcdac34a849fc238c2
|
4
|
+
data.tar.gz: 5fd853a1998fae2acbe01159b984537d2ba97349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2503486bfd1dab699afb6cbf80b5e21c7d127a3150a737d19579b178b2e67ab41393d5167fe0f50575623656e0b103a49ba2d4cadf8a2d4859fb60c7a4bce83e
|
7
|
+
data.tar.gz: 6d81568afeafd111cd10725defb07084c2cc31c973da1c8e72070f28dae2da05d1e84a4f5189d871f1264a0e0646685d76ba95a2010d59a4552a5034bf68f37e
|
data/hash_plus.gemspec
CHANGED
data/lib/hash_plus.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class Hash
|
2
2
|
# Short hand methods
|
3
|
-
def requires(*cols); requires_fields(cols); end
|
4
|
-
def missing(*cols); missing_fields(cols); end
|
3
|
+
def requires(*cols); requires_fields(*cols); end
|
4
|
+
def missing(*cols); missing_fields(*cols); end
|
5
5
|
|
6
6
|
# Raise an ArgumentError if there are missing columns
|
7
7
|
def requires_fields(*cols)
|
8
|
-
missing = missing_fields(cols)
|
8
|
+
missing = missing_fields(*cols)
|
9
9
|
unless missing.empty?
|
10
10
|
raise ArgumentError, "Missing value for keys=#{missing.join(',')} in opts=#{self.inspect}"
|
11
11
|
end
|