Module: Speculations::CLI
Instance Method Summary collapse
Instance Method Details
#run(args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/speculations/cli.rb', line 4 def run args debug = false force = false loop do case args.first when "-h", "--help" _usage when "-v", "--version" _version when "-d", "--debug" debug = true args = args.drop(1) when "-f", "--force" force = true args = args.drop(1) return _compile_and_maybe_run(args, debug:, force:) else return _compile_and_maybe_run(args, debug:, force:) end end end |