Sha256: e241122423405b3b96ce91a4005ab20f7e5b9a03cc2cbec7cdaa6a05eba806c0

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

module Depcheck
  module SimpleOutput

    def self.post(objs, verbose)
      objs = objs.sort_by { |obj| obj.dependencies.size }.reverse

      objs.each_with_index do |obj, index|
        print "#{index + 1}. #{obj.name} - #{obj.dependencies.size}"
        print " - [#{obj.dependencies.join(', ')}]" if verbose
        print "\n"
      end
    end

    def self.post_usage(objs)
      objs = objs.sort_by(&:usage).reverse

      objs.each_with_index do |obj, index|
        puts "#{index + 1}. #{obj.name} - #{obj.usage} \n"
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
depcheck-0.2.0 lib/depcheck/output/simple_output.rb