Sha256: 998f048b19690e911c55543bb07ac1b4809cb8032ea111233b23fd6be5ea324f

Contents?: true

Size: 606 Bytes

Versions: 12

Compression:

Stored size: 606 Bytes

Contents

class RoodiAnalyzer
  include ScoringStrategies

  COLUMNS = %w{problems}

  def columns
    COLUMNS
  end

  def name
    :roodi
  end

  def map(row)
    ScoringStrategies.present(row)
  end

  def reduce(scores)
    ScoringStrategies.sum(scores)
  end

  def score(metric_ranking, item)
    ScoringStrategies.percentile(metric_ranking, item)
  end

  def generate_records(data, table)
    return if data==nil
    Array(data[:problems]).each do |problem|
      table << {
        "metric" => name,
        "problems" => problem[:problem],
        "file_path" => problem[:file]
      }
    end
  end

end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
metric_fu-2.1.3.4 lib/metrics/roodi/roodi_analyzer.rb
bf4-metric_fu-2.1.3.4 lib/base/roodi_analyzer.rb
bf4-metric_fu-2.1.3.3 lib/base/roodi_analyzer.rb
bf4-metric_fu-2.1.3.2 lib/base/roodi_analyzer.rb
bf4-metric_fu-2.1.3.1 lib/base/roodi_analyzer.rb
danmayer-metric_fu-2.1.3 lib/base/roodi_analyzer.rb
danmayer-metric_fu-2.1.2 lib/base/roodi_analyzer.rb
rferraz-metric_fu-2.1.2 lib/base/roodi_analyzer.rb
rferraz-metric_fu-2.1.1 lib/base/roodi_analyzer.rb
metric_fu-2.1.1 lib/base/roodi_analyzer.rb
metric_fu-2.1.0 lib/base/roodi_analyzer.rb
metric_fu-2.0.1 lib/base/roodi_analyzer.rb