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

Version Path
configliere-0.4.22 examples/help_message_demo.rb
configliere-0.4.18 examples/help_message_demo.rb
configliere-0.4.17 examples/help_message_demo.rb
configliere-0.4.16 examples/help_message_demo.rb
configliere-0.4.14 examples/help_message_demo.rb
configliere-0.4.13 examples/help_message_demo.rb
configliere-0.4.12 examples/help_message_demo.rb
configliere-0.4.11 examples/help_message_demo.rb
configliere-0.4.10 examples/help_message_demo.rb
configliere-0.4.8 examples/help_message_demo.rb
configliere-0.4.7 examples/help_message_demo.rb
configliere-0.4.6 examples/help_message_demo.rb
configliere-0.4.5 examples/help_message_demo.rb
configliere-0.4.4 examples/help_message_demo.rb