Class: Preek::SmellFile

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

Overview

A smelly file

Instance Method Summary collapse

Constructor Details

#initialize(smells) ⇒ SmellFile

Returns a new instance of SmellFile.



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

def initialize(smells)
  @smells = smells
  @klass_collector = KlassCollector.new
end

Instance Method Details

#fileObject



15
16
17
# File 'lib/preek/smell_file.rb', line 15

def file
  @smells.first.source
end

#klassesObject



10
11
12
13
# File 'lib/preek/smell_file.rb', line 10

def klasses
  add_smells_to_klass
  @klass_collector.get_klasses
end