Sha256: b76b8e923d231a670f5d82b4d5c575e8d00622f2ac0ce38669c621dcd07dceff

Contents?: true

Size: 794 Bytes

Versions: 9

Compression:

Stored size: 794 Bytes

Contents

#!/usr/bin/env ruby

require "../lib/como"
include Como

Spec.command( "como_options", "Como Tester", "2013",
  [
    [ :exclusive, "doc", nil, "Documentation for option\n\twith too much description\n\tfor one line." ],
    [ :single, "file", "-f", "File argument." ],
    [ :switch, "debug", nil, "Enable debugging." ],
    [ :opt_single, "mode", "-m", "Mode." ],
    [ :opt_multi, "params", nil, "Parameters." ],
    [ :opt_any, "types", "-t", "Types." ],
    [ :silent, "terminator", "-", "The terminator." ],
    [ :multi, "dir", "-d", "Directory argument(s)." ],
    [ :default, "Leftovers." ],
  ] )


Opt.each do |o|
    puts "Given \"#{o.name}\": #{o.given}"
    puts "Value \"#{o.name}\": #{o.value}" if o.given && o.value
end

if Opt.external
    puts "External: #{Opt.external}"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
como-0.2.2 test/como_options
como-0.2.1 test/como_options
como-0.2.0 test/como_options
como-0.1.7 test/como_options
como-0.1.6 test/como_options
como-0.1.5 test/como_options
como-0.1.4 test/como_options
como-0.1.3 test/como_options
como-0.1.2 test/como_options