Sha256: 97e2f6afc30fb4b67016be48f5b88e7359440eda8ad93ce00a87c85b2b4cb5c1
Contents?: true
Size: 624 Bytes
Versions: 1
Compression:
Stored size: 624 Bytes
Contents
require 'optiflag' # Example 5: Using keyword module Example extend OptiFlag::Flagset keyword "checkin" do alternate_forms "ci" end keyword "checkout" do alternate_forms "co" end flag "file" flag "m" do alternate_forms "message" end handle_errors_and_help end puts "User has chosen to checkin #{ARGV.flag_value.file } " if ARGV.flag_value.ci? puts "User has chosen to check out #{ARGV.flag_value.file }" if ARGV.flag_value.checkout? #h# ruby example_5.rb ci -file c:/StronglyTyped.java -m done #h# ruby example_5.rb co -file c:/StronglyTyped.java -m done
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
optiflag-0.6 | doc/example/example_5.rb |