claide 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/claide.rb +4 -3
- metadata +1 -1
data/README.markdown
CHANGED
@@ -108,6 +108,6 @@ should not be a need to validate the parameters.
|
|
108
108
|
See the [example][example] for a illustration of how to define commands.
|
109
109
|
|
110
110
|
|
111
|
-
[docs]: http://rubydoc.info/
|
111
|
+
[docs]: http://rubydoc.info/github/CocoaPods/CLAide/0.1.0/frames
|
112
112
|
[example]: https://github.com/alloy/CLAide/blob/master/examples/make.rb
|
113
113
|
[report-error]: https://github.com/CocoaPods/CocoaPods/blob/054fe5c861d932219ec40a91c0439a7cfc3a420c/lib/cocoapods/command.rb#L36
|
data/lib/claide.rb
CHANGED
@@ -8,7 +8,7 @@ module CLAide
|
|
8
8
|
#
|
9
9
|
# CLAide’s version, following [semver](http://semver.org).
|
10
10
|
#
|
11
|
-
VERSION = '0.1.
|
11
|
+
VERSION = '0.1.1'
|
12
12
|
|
13
13
|
# This class is responsible for parsing the parameters specified by the user,
|
14
14
|
# accessing individual parameters, and keep state by removing handled
|
@@ -119,8 +119,9 @@ module CLAide
|
|
119
119
|
# argv.arguments # => ['white']
|
120
120
|
#
|
121
121
|
def shift_argument
|
122
|
-
if
|
123
|
-
@entries
|
122
|
+
if index = @entries.find_index { |type, _| type == :arg }
|
123
|
+
entry = @entries[index]
|
124
|
+
@entries.delete_at(index)
|
124
125
|
entry.last
|
125
126
|
end
|
126
127
|
end
|