Class: Reek::SmellWarning

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

Overview

Is was easier this way

Instance Method Summary collapse

Instance Method Details

#klassObject



4
5
6
# File 'lib/preek/ext/smell_warning.rb', line 4

def klass
  context[/^([\w:]*)(#\w*)?/, 1]
end

#smell_methodObject



8
9
10
# File 'lib/preek/ext/smell_warning.rb', line 8

def smell_method
  context[/^([\w:]*)(#\w*)?/, 2]
end

#smell_stringObject



12
13
14
# File 'lib/preek/ext/smell_warning.rb', line 12

def smell_string
  "#{smell_method} #{message} (#{smell_type}) at lines #{Array(lines)*','}"
end