Sha256: 56f2474330b18601d27ff44ee1aafe67215ed1dffa16f8134b5224c06c90e7e0

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

$:.unshift File.dirname(__FILE__)

module Reek

  class Report
    def initialize  # :nodoc:
      @smells = []
    end

    def <<(smell)  # :nodoc:
      @smells << smell
    end
    
    def empty?  # :nodoc:
      @smells.empty?
    end
    
    def length  # :nodoc:
      @smells.length
    end
    
    def [](i)  # :nodoc:
      @smells[i]
    end

    # Creates a formatted report of all the smells recorded in
    # this report.
    def to_s
      @smells.map {|smell| smell.report}.join("\n")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reek-0.1.0 lib/reek/report.rb