Class: Preek::SmellFile
- Inherits:
-
Object
- Object
- Preek::SmellFile
- Defined in:
- lib/preek/smell_file.rb
Overview
A smelly file
Instance Method Summary collapse
- #file ⇒ Object (also: #filename)
-
#initialize(examiner) ⇒ SmellFile
constructor
A new instance of SmellFile.
- #klasses ⇒ Object
Constructor Details
#initialize(examiner) ⇒ SmellFile
Returns a new instance of SmellFile.
5 6 7 8 9 |
# File 'lib/preek/smell_file.rb', line 5 def initialize(examiner) @examiner = examiner @klasses = {} add_smells_to_klasses end |
Instance Method Details
#file ⇒ Object Also known as: filename
11 12 13 |
# File 'lib/preek/smell_file.rb', line 11 def file @examiner.description end |
#klasses ⇒ Object
17 18 19 20 21 22 |
# File 'lib/preek/smell_file.rb', line 17 def klasses return @klasses unless block_given? @klasses.each do |name, klass| yield klass end end |