Sha256: c294993fdb0f0816929b52dfd308dad7edbae1405a1f437c08c35a4a9cf90bef
Contents?: true
Size: 743 Bytes
Versions: 1
Compression:
Stored size: 743 Bytes
Contents
require 'optiflag' # Example 2.5: # Variation 5: User can get help on a specific flag. module Example extend OptiFlag::Flagset flag "dir" optional_flag "log" do description "The directory into which log files will be written" end flag "username" do description "A Zeta-Blub Appliction Username." end flag "password" do description "Your IT issued password. Don't forget it!" end usage_flag "h","help","?" handle_errors_and_help end ## Normal mode: # ruby example_2_5.rb -help # ruby example_2_5.rb -? # ruby example_2_5.rb -h ## Help on something specific: #h# ruby example_2_5.rb -help username #h# ruby example_2_5.rb -? log #h# ruby example_2_5.rb -h password
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
optiflag-0.6 | doc/example/example_2_5.rb |