dreck 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dreck.rb +1 -1
- data/lib/dreck/exceptions.rb +3 -2
- 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: 76f82aab82fd006ce53aa4b41917dd7c7bbe91f4
|
4
|
+
data.tar.gz: c7c4d8928fecd566bc46dabc8016fcff6ba36397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b682f13bdbadbe739f52c4ec155a616fa8570d8d0ecc2e203ebf53912746325199ceba5234057495e4cb98c56e4e3a3907b8a8cfda4f317fab49a064e5e0008
|
7
|
+
data.tar.gz: ad5aedb658c0375d68145fe209253d2b4f4a1d4c63154e93abad0422936286310d2784553d7b7fbf063746d68f10f6dfc5512df313a032ef59d77cccd8cdd6a2
|
data/lib/dreck.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative "dreck/result"
|
|
5
5
|
# The primary namespace for {Dreck}.
|
6
6
|
module Dreck
|
7
7
|
# {Dreck}'s current version.
|
8
|
-
VERSION = "0.0.
|
8
|
+
VERSION = "0.0.6"
|
9
9
|
|
10
10
|
# Parse the given arguments and produce a result.
|
11
11
|
# @param args [Array<String>] the arguments to parse
|
data/lib/dreck/exceptions.rb
CHANGED
@@ -13,8 +13,9 @@ module Dreck
|
|
13
13
|
# @param greedy [Boolean] whether or not a list that absorbs the tail is present
|
14
14
|
def initialize(actual, expected, greedy = false)
|
15
15
|
nmany = actual > expected ? "too few" : "too many"
|
16
|
-
|
17
|
-
|
16
|
+
act = greedy ? expected : actual
|
17
|
+
exp = greedy ? ">=#{actual}" : expected
|
18
|
+
super "#{nmany} arguments given (#{act}, expected #{exp})"
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|