Last active
September 21, 2016 23:56
-
-
Save talarczykco/72d31e53156fe82cecf8dc8c71421280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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