cliswitch 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cliswitch.rb +8 -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: 5f884b75767f531b219206e74ae7ecaceea9fc9b6605f0ddc08175283447e497
|
4
|
+
data.tar.gz: ef07f732a488e51e9483a903c70c089df190018f0919aebed8ee33856654cb80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 564f3153be079f12cda33df74bbe9b0aedd6166fbd36df55ea4f803189564adc407a34daa84c8195720a2da6d883f705fb1c7f273ce1768cd16efadc6da41498
|
7
|
+
data.tar.gz: 426f9e35c603935b9d04d71156a581460b4287e957dc4c727d4d3c061614858550783d4e219a34a4365cf0db6936dbe48f780c72f70eb92864a4ce2fa2cb6ede
|
data/lib/cliswitch.rb
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
class CliSwitch
|
14
14
|
|
15
|
-
VERSION = "0.2.
|
15
|
+
VERSION = "0.2.1"
|
16
16
|
|
17
17
|
class Option
|
18
18
|
attr_accessor :name,
|
@@ -103,11 +103,13 @@ class CliSwitch
|
|
103
103
|
arr.delete_at(_2+1)
|
104
104
|
when 'optional'
|
105
105
|
next_arg = arr[_2 + 1]
|
106
|
-
if next_arg.
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
if !next_arg.nil?
|
107
|
+
if next_arg.start_with?('-') && search_in_options_config(next_arg)
|
108
|
+
# do nothing
|
109
|
+
else
|
110
|
+
op.next_arg = next_arg
|
111
|
+
arr.delete_at(_2+1)
|
112
|
+
end
|
111
113
|
end
|
112
114
|
when 'noarg'
|
113
115
|
# do nothing
|