Sha256: 61d1e136455eb3dd6e3842ed65d19c22ba37530680a5515dd861f992a2521737

Contents?: true

Size: 589 Bytes

Versions: 14

Compression:

Stored size: 589 Bytes

Contents

#!/usr/bin/env ruby
$: << File.dirname(__FILE__)+'/../lib'
require 'configliere'

Settings.use :commandline, :prompt
Settings.define :underpants, :description => 'boxers or briefs'
Settings.resolve!

puts %Q{
Configliere can prompt for a parameter value if none is given.
If you call this with a value for --underpants, you will not see a prompt
}

puts %Q{Using the commandline setting #{ARGV.grep(/^--underpants/).inspect}
your configliere advises that the settings are
  #{Settings.inspect}
}

puts Settings.prompt_for(:underpants)

puts %Q{Now the Settings are
  #{Settings.inspect}
}

Version data entries

14 entries across 14 versions & 1 rubygems

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