class Gitclean::CLI
Attributes
options[R]
parser[R]
Public Instance Methods
parse(args)
click to toggle source
Return a structure describing the options.
# File lib/gitclean/cli.rb, line 13 def parse(args) # The options specified on the command line will be collected in # *options*. @options = ScriptOptions.new @args = OptionParser.new do |parser| @options.define_options(parser) parser.parse!(args) end @options end
run()
click to toggle source
# File lib/gitclean/cli.rb, line 26 def run() branches = get_git_branches - @options.exemptions delete_git_branches(branches) puts "Branches were cleaned up - #{branches.size} deleted" end