Sha256: 55d247ca3cdb02ee4049ae17b177c6ef4714817c58f5af532dee19b65bd6e094
Contents?: true
Size: 913 Bytes
Versions: 2
Compression:
Stored size: 913 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'optparse_plus' require '<%= require_file %>' class App include OptparsePlus::Main include OptparsePlus::CLILogging main do # Add args you want: |like,so| # your program code here # You can access CLI options via # the options Hash end # supplemental methods here # Declare command-line interface here # description "one line description of your app" # # Accept flags via: # on("--flag VAL","Some flag") # options[flag] will contain VAL # # Specify switches via: # on("--[no-]switch","Some switch") # # Or, just call OptionParser methods on opts # # Require an argument # arg :some_arg # # # Make an argument optional # arg :optional_arg, :optional version <%= module_name %>::VERSION use_log_level_option :toggle_debug_on_signal => 'USR1' description "My awesome command line app!" go! end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
optparse-plus-3.0.1 | templates/full/bin/executable.erb |
optparse-plus-3.0.0 | templates/full/bin/executable.erb |