Created
February 18, 2009 05:59
-
-
Save anonymous/66217 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 | |
ARGV = ['foo'] if ARGV.empty? | |
require 'rubygems' | |
require 'commander' | |
program :name, 'foo' | |
program :version, '1.1.1' | |
program :description, 'Foo' | |
command :foo do |c| | |
c.syntax = '' | |
c.description = '' | |
c.example 'description', 'command example' | |
c.option '--some-switch', 'Some switch that does something' | |
c.when_called do |args, options| | |
puts 'foo' | |
end | |
end | |
command :bar do |c| | |
c.syntax = '' | |
c.description = '' | |
c.example 'description', 'command example' | |
c.option '--some-switch', 'Some switch that does something' | |
c.when_called do |args, options| | |
puts 'bar' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment