N
Nick Klauer
[Note: parts of this message were removed to make it a legal post.]
So I can't find any good place to post this question, unless I'm filing it
as a bug to the gem authors. Before I do that, I'm hoping someone in this
group might know the answer.
With the Thor <http://rubygems.org/gems/thor> gem, it looks to do
almost everything I need to create a pretty rich command-line interface for
generating scaffolding for a project. I want to provide the user a "usage
banner" when they call the app without passing any arguments. I don't
know/can't find the documentation stating how this is configured in an app.
Does anyone have a simple code example that shows how this might be done?
class App < Thor
desc "do awesome stuff"
def awesomeifier
...
end
....
def no_args
# print some banner or something
end
end
App.start
-Nick Klauer
So I can't find any good place to post this question, unless I'm filing it
as a bug to the gem authors. Before I do that, I'm hoping someone in this
group might know the answer.
With the Thor <http://rubygems.org/gems/thor> gem, it looks to do
almost everything I need to create a pretty rich command-line interface for
generating scaffolding for a project. I want to provide the user a "usage
banner" when they call the app without passing any arguments. I don't
know/can't find the documentation stating how this is configured in an app.
Does anyone have a simple code example that shows how this might be done?
class App < Thor
desc "do awesome stuff"
def awesomeifier
...
end
....
def no_args
# print some banner or something
end
end
App.start
-Nick Klauer