Class: Preek::KlassCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/preek/klass_collector.rb

Overview

This keeps track of classes in a smelly file

Instance Method Summary collapse

Constructor Details

#initializeKlassCollector

Returns a new instance of KlassCollector.



5
6
7
# File 'lib/preek/klass_collector.rb', line 5

def initialize
  @klasses = {}
end

Instance Method Details

#find(klassname) ⇒ Object



9
10
11
# File 'lib/preek/klass_collector.rb', line 9

def find(klassname)
  @klasses[klassname.to_sym] ||= SmellKlass.new
end

#get_klassesObject



13
14
15
# File 'lib/preek/klass_collector.rb', line 13

def get_klasses
  @klasses
end