Sha256: 7d5d92f7112de0278869b22056400cba82e1cc4152015ccc2ad8743ae56b7c3b
Contents?: true
Size: 611 Bytes
Versions: 11
Compression:
Stored size: 611 Bytes
Contents
module Preek # A smelly file class SmellFile def initialize(examiner) @examiner = examiner @klasses = {} add_smells_to_klasses end def file @examiner.description end alias :filename :file def klasses return @klasses unless block_given? @klasses.each do |name, klass| yield klass end end private def add_smells_to_klasses @examiner.smells.each do |smell| find(smell.klass) << smell end end def find(klassname) @klasses[klassname.to_sym] ||= SmellKlass.new(klassname) end end end
Version data entries
11 entries across 11 versions & 1 rubygems