Class: RubyCritic::Analyser::ReekSmells

Inherits:
Object
  • Object
show all
Includes:
Colorize
Defined in:
lib/rubycritic/analysers/smells/reek.rb

Instance Method Summary collapse

Methods included from Colorize

#colorize, #green, #red

Constructor Details

#initialize(analysed_modules) ⇒ ReekSmells

Returns a new instance of ReekSmells.


10
11
12
# File 'lib/rubycritic/analysers/smells/reek.rb', line 10

def initialize(analysed_modules)
  @analysed_modules = analysed_modules
end

Instance Method Details

#runObject


14
15
16
17
18
19
20
# File 'lib/rubycritic/analysers/smells/reek.rb', line 14

def run
  @analysed_modules.each do |analysed_module|
    add_smells_to(analysed_module)
    print green '.'
  end
  puts ''
end

#to_sObject


22
23
24
# File 'lib/rubycritic/analysers/smells/reek.rb', line 22

def to_s
  'reek smells'
end