File: banners3.rb

package info (click to toggle)
ruby-optimist 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 348 kB
  • sloc: ruby: 2,912; makefile: 4
file content (14 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby
require_relative '../lib/optimist'

Optimist::options do
  version "cool-script v0.3.2 (code-name: apple-cake)"
  banner self.version  ## print out the version in the banner
  banner "drinks"
  opt :juice, "use juice"
  opt :milk, "use milk"
  banner "drink control"    ## can be used for categories
  opt :litres, "quantity of liquid", :default => 2.0
  opt :brand, "brand name of the liquid", :type => :string
  banner "other controls"
end