Sha256: af78052fa5551e76c4542bd3a946b40298524902356a0c12c54a906cf7ae67dc

Contents?: true

Size: 900 Bytes

Versions: 48

Compression:

Stored size: 900 Bytes

Contents

require_relative '../../common/options/parser'
require_relative '../../common/version'

module Bake

  class BakecleanOptions < Parser
    attr_reader :preview # Boolean

    def initialize(argv)
      super(argv)

      @preview = false

      add_option(["--preview"    ], lambda { @preview = true                                         })
      add_option(["-h", "--help" ], lambda { usage; ExitHelper.exit(0)                               })
      add_option(["--version"    ], lambda { Bake::Version.printBakecleanVersion; ExitHelper.exit(0) })
    end

    def usage
      puts "\nUsage: bakeclean [options]"
      puts " --preview        Only shows the folder which would be deleted."
      puts " --version        Print version."
      puts " -h, --help       Print this help."
    end

    def parse_options()
      parse_internal(false)
    end

  end

end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
bake-toolkit-2.50.0 lib/bakeclean/options/options.rb
bake-toolkit-2.49.0 lib/bakeclean/options/options.rb
bake-toolkit-2.48.3 lib/bakeclean/options/options.rb
bake-toolkit-2.48.2 lib/bakeclean/options/options.rb
bake-toolkit-2.48.1 lib/bakeclean/options/options.rb
bake-toolkit-2.48.0 lib/bakeclean/options/options.rb
bake-toolkit-2.47.1 lib/bakeclean/options/options.rb
bake-toolkit-2.47.0 lib/bakeclean/options/options.rb