scallop 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/scallop/version.rb +1 -1
- data/lib/scallop.rb +17 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adaadba09ddd3d7f42551b9d2124a0e440a36a748bcf51133152dc92270b04c5
|
4
|
+
data.tar.gz: 8470f4d3ddd1770f8f2b59dcbe6562040114957903acdbfa5393a4abd8c9c54b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb1b91457da1830a8e85e878376b00f78bd457518e05a2cdeeff76f6e8fe150a8d3a0147560a8c6f5dc47de5111791c1925b3f58b255197fc0d23524ce7a46ed
|
7
|
+
data.tar.gz: 61ba0883e457b12470ea872bd3d6aec83576816cb720877b5a36a7d7ec6e93a2f85af519422d4fa02f6d5057b60733acc13968738ad0f3d2ecc488ae59cf6f93
|
data/Gemfile.lock
CHANGED
data/lib/scallop/version.rb
CHANGED
data/lib/scallop.rb
CHANGED
@@ -61,18 +61,29 @@ class Scallop
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def sudo(sudo = true)
|
64
|
-
|
65
|
-
|
64
|
+
dup
|
65
|
+
.tap do |instance|
|
66
|
+
instance.instance_eval { @sudo = sudo }
|
67
|
+
end
|
68
|
+
.freeze
|
66
69
|
end
|
67
70
|
|
68
71
|
def cmd(*cmd)
|
69
|
-
|
70
|
-
|
72
|
+
dup
|
73
|
+
.tap do |instance|
|
74
|
+
instance.instance_eval { @cmd = cmd }
|
75
|
+
end
|
76
|
+
.freeze
|
71
77
|
end
|
72
78
|
|
73
79
|
def set(params)
|
74
|
-
@params.merge
|
75
|
-
|
80
|
+
new_params = @params.merge(params)
|
81
|
+
|
82
|
+
dup
|
83
|
+
.tap do |instance|
|
84
|
+
instance.instance_eval { @params = new_params }
|
85
|
+
end
|
86
|
+
.freeze
|
76
87
|
end
|
77
88
|
|
78
89
|
def to_command
|