Skip to content

Instantly share code, notes, and snippets.

@banister
Created January 21, 2012 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banister/4643b962ba6facf8b858 to your computer and use it in GitHub Desktop.
Save banister/4643b962ba6facf8b858 to your computer and use it in GitHub Desktop.
opts = Slop.parse(["-m hello"]) do |opt|
opt.on :m, :method, "method name" do |meth|
puts meth
end
end
# => #<Slop config_options={}
# #<Slop::Option short_flag="m" long_flag="method" argument=false description="method name">
# >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment