Sha256: a0771e08338fa00d5dc7328a20630c849b3940cdc8ffce798987f96f3c7b7cdf

Contents?: true

Size: 723 Bytes

Versions: 21

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true

module CrudeMutant
  class RunResult
    attr_reader :file_path, :line_number, :success, :line_contents

    def initialize(file_path, line_number, success, line_contents, benchmark)
      @file_path = file_path
      @line_number = line_number
      @success = success
      @line_contents = line_contents
      @benchmark = benchmark
    end

    def success?
      success
    end

    def time_taken
      @benchmark.real
    end
  end

  class NullRunResult
    attr_reader :line_number

    def initialize(line_number)
      @line_number = line_number
    end

    def success?
      false
    end

    def time_taken
      0.0
    end

    def line_contents
      ''
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
crude-mutant-0.6.2 lib/crude_mutant/run_result.rb
crude-mutant-0.6.1 lib/crude_mutant/run_result.rb
crude-mutant-0.6.0 lib/crude_mutant/run_result.rb
crude-mutant-0.5.5 lib/crude_mutant/run_result.rb
crude-mutant-0.5.4 lib/crude_mutant/run_result.rb
crude-mutant-0.5.3 lib/crude_mutant/run_result.rb
crude-mutant-0.5.2 lib/crude_mutant/run_result.rb
crude-mutant-0.5.1 lib/crude_mutant/run_result.rb
crude-mutant-0.5.0 lib/crude_mutant/run_result.rb
crude-mutant-0.4.0 lib/crude_mutant/run_result.rb
crude-mutant-0.3.4 lib/crude_mutant/run_result.rb
crude-mutant-0.3.3 lib/crude_mutant/run_result.rb
crude-mutant-0.3.2 lib/crude_mutant/run_result.rb
crude-mutant-0.3.1 lib/crude_mutant/run_result.rb
crude-mutant-0.3.0 lib/crude_mutant/run_result.rb
crude-mutant-0.2.3 lib/crude_mutant/run_result.rb
crude-mutant-0.2.2 lib/crude_mutant/run_result.rb
crude-mutant-0.2.1 lib/crude_mutant/run_result.rb
crude-mutant-0.2.0 lib/crude_mutant/run_result.rb
crude-mutant-0.1.1 lib/crude_mutant/run_result.rb