Skip to content

Instantly share code, notes, and snippets.

@talarczykco
Last active September 21, 2016 23:56
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 talarczykco/72d31e53156fe82cecf8dc8c71421280 to your computer and use it in GitHub Desktop.
Save talarczykco/72d31e53156fe82cecf8dc8c71421280 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# https://gist.github.com/mijit/72d31e53156fe82cecf8dc8c71421280
require 'thor'
module App
class Foo < Thor
desc "bar", "do some bar thing"
def bar
puts "BAR!"
end
desc "baz", "do some baz thing"
def baz
puts "BAZ!"
end
end
class CLI < Thor
desc "foo", "do some foo thing"
subcommand "foo", Foo
desc "blech", "do some blech thing"
def blech
puts "BLECH!"
end
end
end
App::CLI.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment