You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slop is exclusively for parsing options and flags, so anything that doesn't have a - character prepended will be missed.
Using the destructive parse! method though, Slop will remove any items it parses and leave you with the items it ignored. For example:
Slop.parse! do
opt :n, :name, true
end
p ARGV
When using foo --name bar baz ARGV will be left with ["foo", "baz"] so you can now test against values inside this Array. See the documentation for parse!here. There is also an example of this functionality inside of the Usage section of the README.
If you have any other questions please refrain from creating an issue and instead check the API documentation, or feel free to jump onto IRC (freenode) on #ruby-lang and ask me any questions.
It's possible to create commands without dashes? For example:
boo init something
Awesome gem BTW :-)
The text was updated successfully, but these errors were encountered: