Sha256: 57473515d5054e5172f2da88fb2372a9f762ff1cd6dd94caaa57b354c190b5f4

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

#!/usr/bin/env ruby

require "opt_parse_builder"

ARG_PARSER = OptParseBuilder.build_parser do |args|
  args.banner "A simple example"
  args.add do |arg|
    arg.key :path
    arg.required_operand
  end
  args.add do |arg|
    arg.key :verbose
    arg.on "-v", "--verbose", "Be verbose"
  end
  args.separator "Some explanatory text at the bottom"
end

arg_values = ARG_PARSER.parse!
p arg_values.verbose
p arg_values.path

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opt_parse_builder-0.1.0 examples/hello_world.rb