Sha256: 0352c0f0e092475c5ac38f82f2cd83adec504445ef805f80f91b3f40afc2217e

Contents?: true

Size: 912 Bytes

Versions: 11

Compression:

Stored size: 912 Bytes

Contents

#!/usr/bin/env ruby

require "../lib/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}"
    puts "Value \"#{o.name}\": #{o.value}" if o.given && 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

11 entries across 11 versions & 1 rubygems

Version Path
como-0.2.4 test/como_compatible
como-0.2.3 test/como_compatible
como-0.2.2 test/como_compatible
como-0.2.1 test/como_compatible
como-0.2.0 test/como_compatible
como-0.1.7 test/como_compatible
como-0.1.6 test/como_compatible
como-0.1.5 test/como_compatible
como-0.1.4 test/como_compatible
como-0.1.3 test/como_compatible
como-0.1.2 test/como_compatible