Sha256: ee832e00b22a989e81dd4907f48df6da77040ed867176323253100ff61536a53
Contents?: true
Size: 1.03 KB
Versions: 14
Compression:
Stored size: 1.03 KB
Contents
#!/usr/bin/env ruby $: << File.dirname(__FILE__)+"/../lib" require 'configliere' Settings.use :commandline Settings.define :logfile, :type => String, :description => "Log file name", :default => 'myapp.log', :required => false Settings.define :debug, :type => :boolean, :description => "Log debug messages to console?", :required => false Settings.define :dest_time, :type => DateTime, :description => "Arrival time", :required => true Settings.define :takes_opt, :flag => 't', :description => "Takes a single-letter flag '-t'" Settings.define :foobaz, :internal => true, :description => "You won't see me" Settings.define 'delorean.power_source', :env_var => 'POWER_SOURCE', :description => 'Delorean subsytem supplying power to the Flux Capacitor.' Settings.define :password, :required => true, :encrypted => true Settings.description = 'This is a sample script to demonstrate the help message. Notice how pretty everything lines up YAY' Settings.resolve! rescue nil puts "Run me again with --help to see the auto-generated help message!"
Version data entries
14 entries across 14 versions & 1 rubygems