Sha256: e19fdacdd19ee96c6e7544c7f3e0d9a57383571e7143a45ea8900b19fc2abe2a

Contents?: true

Size: 609 Bytes

Versions: 9

Compression:

Stored size: 609 Bytes

Contents

# encoding: utf-8

module Pelusa
  class RubyReporter < Reporter
    def report
      hash = @reports.inject({}) do |acc, report|
        class_name = report.class_name
        acc[class_name] = hashify_report(report)
        acc
      end
      hash[:filename] = @filename unless hash.empty?
      hash
    end

    private

    def hashify_report(report)
      analyses = report.analyses
      analyses.inject({}) do |acc, analysis|
        name = analysis.name
        acc[name] = {
          status:  analysis.status,
          message: analysis.message,
        }
        acc
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pelusa-0.2.4 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.2.3 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.2.2 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.2.1 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.2.0 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.1.1 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.1.0 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.0.2 lib/pelusa/reporters/ruby_reporter.rb
pelusa-0.0.1 lib/pelusa/reporters/ruby_reporter.rb