Sha256: 6dc0c00d86f19c2313eb1722485e93b919c60defb2cfd9d13b2b057dea0175d4

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

require 'inch/cli/command/options/suggest'
require 'inch/cli/command/output/suggest'

module Inch
  module CLI
    module Command
      class Suggest < List
        register_command_as :suggest, true

        def description
          'Suggests some objects to be documented (better)'
        end

        def usage
          'Usage: inch suggest [paths] [options]'
        end

        # Runs the commandline utility, parsing arguments and displaying a
        # list of objects
        #
        # @param [Array<String>] args the list of arguments.
        # @return [void]
        def run(*args)
          prepare_codebase(*args)
          context = API::Suggest.new(codebase, @options)
          if @options.format == Options::Suggest::FORMAT_TEXT
            Output::Suggest.new(@options, context.all_objects, context.objects,
                                context.grade_lists, context.files)
          else
            Output::Stats.new(@options, context.all_objects, context.grade_lists)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
inch-0.6.4 lib/inch/cli/command/suggest.rb
inch-0.6.3 lib/inch/cli/command/suggest.rb
inch-0.6.2 lib/inch/cli/command/suggest.rb
inch-0.6.1 lib/inch/cli/command/suggest.rb