Created
December 21, 2009 08:55
-
-
Save jeroenvandijk/260861 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
# In example.rb | |
module Example | |
# This method does something | |
def command1(arg1, arg2, options = {}) | |
end | |
# This method does something else | |
def command2(arg1, arg2, options = {}) | |
end | |
end | |
# In run_example.rb | |
require 'rubygems' | |
require 'boson' | |
Boson.load_module(Example) # or a similar command that loads the module | |
Boson.start | |
# The following would be possible from the command line | |
# ./run_example.rb command1 arg1 arg2 --option1=foo --option2=bar | |
# ./run_example.rb command2 arg1 arg2 --option1=foo --option2=bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment