Sha256: e179a8023a003458786fc2f9804e48fc3c6225fa3ae3facb7b0a854f1fcccc56

Contents?: true

Size: 910 Bytes

Versions: 1

Compression:

Stored size: 910 Bytes

Contents

#!/usr/bin/env ruby

require "como"
include Como

Spec.defineCheckHelp( "como_compatible", "Como Tester", "2013",
  [
    [ :silent, "help", "-h", "Display usage info." ],
    [ :exclusive, "doc", nil, "Documentation." ],
    [ :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}"
end

Opt.each_given do |o|
    puts "Value \"#{o.name}\": #{o.value}"
end

Opt[ 'params' ].given( true ) do |o|
    o.params.each do |k,v|
        puts "Param #{k}: #{v}"
    end
end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
como-0.1.0 test/como_compatible