Class: Preek::KlassCollector
- Inherits:
-
Object
- Object
- Preek::KlassCollector
- Defined in:
- lib/preek/klass_collector.rb
Overview
This keeps track of classes in a smelly file
Instance Method Summary collapse
- #find(klassname) ⇒ Object
- #get_klasses ⇒ Object
-
#initialize ⇒ KlassCollector
constructor
A new instance of KlassCollector.
Constructor Details
#initialize ⇒ KlassCollector
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_klasses ⇒ Object
13 14 15 |
# File 'lib/preek/klass_collector.rb', line 13 def get_klasses @klasses end |