class Octocounter::CommandBuilder
Constants
- DESCRIPTION
- PATH_ARG
Public Instance Methods
run()
click to toggle source
# File lib/octocounter/command_builder.rb, line 14 def run program :name, "Octocounter" program :version, Octocounter::VERSION program :description, DESCRIPTION default_command :run command :run do |c| c.syntax = "octocounter path/to/directory" c.description = DESCRIPTION c.option "--all", String, "Show all list" c.action do |args, options| path = args.shift || abort(PATH_ARG) counter = Octocounter::Counter.new(path, options.all) counter.print_to_screen end end run! end