#!/usr/bin/env ruby require "style_stats" require 'optparse' options = {} opt = OptionParser.new opt.banner = 'Usage: style_stats [options] ' opt.on('-h', '--help', 'output usage information') do puts opt exit end opt.on('-V', '--version', 'output the version number') do |v| puts StyleStats::VERSION exit end opt.on('-f', '--format ', 'set the output format ') { |v| options[:format] = v } opt.parse!(ARGV) if ARGV.empty? puts opt else StyleStats::CLI.run(ARGV, options) end