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.


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

def initialize(analysed_modules)
  @analysed_modules = analysed_modules
end

Instance Method Details

#runObject


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

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

#to_sObject


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

def to_s
  'reek smells'
end