Sha256: 95e25da24aa93f803f952d0e81882a1a77dec2ffb05900001f4790191da7266f
Contents?: true
Size: 780 Bytes
Versions: 4
Compression:
Stored size: 780 Bytes
Contents
require 'thor' require 'fukuzatsu' module Fukuzatsu class CLI < Thor desc_text = "Formats are text (default, to STDOUT), html, and csv. " desc_text << "Example: fuku check foo/ -f html" desc "check PATH_TO_FILE [-f FORMAT] [-t MAX_COMPLEXITY_ALLOWED] [-o OUTPUT_PATH]", desc_text method_option :format, :type => :string, :default => 'text', :aliases => "-f" method_option :threshold, :type => :numeric, :default => 0, :aliases => "-t" method_option :output, :type => :string, :aliases => "-o" def check(path="./") Fukuzatsu.new(path, formatter, options['threshold'], options['output']).report end default_task :check private def formatter options['format'] && options['format'].to_sym || :text end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fukuzatsu-2.2.4 | lib/fukuzatsu/cli.rb |
fukuzatsu-2.2.3 | lib/fukuzatsu/cli.rb |
fukuzatsu-2.2.2 | lib/fukuzatsu/cli.rb |
fukuzatsu-2.2.1 | lib/fukuzatsu/cli.rb |