Sha256: a2fb0af57b65eef430cfb2ae0a0c76ea231b39e7f714adeffd5347e1c212aec1

Contents?: true

Size: 1.26 KB

Versions: 19

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

module Mutant
  class Reporter
    class CLI
      class Printer
        # Env printer
        class Env < self
          delegate(
            :amount_available_tests,
            :amount_mutations,
            :amount_selected_tests,
            :amount_subjects,
            :amount_all_tests,
            :config,
            :test_subject_ratio
          )

          FORMATS = [
            [:info,   'Subjects:        %s',        :amount_subjects       ],
            [:info,   'All-Tests:       %s',        :amount_all_tests      ],
            [:info,   'Available-Tests: %s',        :amount_available_tests],
            [:info,   'Selected-Tests:  %s',        :amount_selected_tests ],
            [:info,   'Tests/Subject:   %0.2f avg', :test_subject_ratio    ],
            [:info,   'Mutations:       %s',        :amount_mutations      ]
          ].each(&:freeze)

          # Run printer
          #
          # @return [undefined]
          def run
            info('Mutant environment:')
            visit(Config, config)
            FORMATS.each do |report, format, value|
              __send__(report, format, __send__(value))
            end
          end
        end # Env
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mutant-0.12.4 lib/mutant/reporter/cli/printer/env.rb
mutant-0.12.3 lib/mutant/reporter/cli/printer/env.rb
mutant-0.12.2 lib/mutant/reporter/cli/printer/env.rb
mutant-0.12.0 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.34 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.33 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.32 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.31 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.30 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.29 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.28 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.27 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.26 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.25 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.24 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.23 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.22 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.21 lib/mutant/reporter/cli/printer/env.rb
mutant-0.11.20 lib/mutant/reporter/cli/printer/env.rb