Sha256: 8855b97d71f00420da54d94fd731f04eb13e1a944ed5e7cd9a073b729578eb4c
Contents?: true
Size: 791 Bytes
Versions: 4
Compression:
Stored size: 791 Bytes
Contents
#! /usr/bin/env ruby require File.dirname(__FILE__) + '/../lib/simplecli' class Hello include SimpleCLI def usage puts <<doco Hello CLI Usage: #{ script_name } command [options] Futher help: #{ script_name } commands # list all available commands #{ script_name } help <COMMAND> # show help for COMMAND #{ script_name } help # show this help message doco end def sayhello_help <<doco Usage: #{ script_name } sayhello [SAY] Arguments: SAY: Something to say (default 'Hello World!') Summary: Says hello! doco end def sayhello *args puts args.empty? ? "Hello World!" : args.join(' ') end end # POSTAMBLE if __FILE__ == $0 Hello.new( ARGV, :default => 'sayhello' ).run end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
remi-simplecli-0.1.4 | examples/hello-cli |
remi-simplecli-0.1.5 | examples/hello-cli |
remi-simplecli-0.1.6 | examples/hello-cli |
simplecli-0.1.6 | examples/hello-cli |