Class: AnalDiffist::ReekProblem
- Inherits:
- 
      Object
      
        - Object
- AnalDiffist::ReekProblem
 
- Defined in:
- lib/analdiffist/reek_parser.rb
Instance Method Summary collapse
- #context ⇒ Object
- #description(mode = :added) ⇒ Object
- #diff(other) ⇒ Object
- 
  
    
      #initialize(smell)  ⇒ ReekProblem 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ReekProblem. 
- #score ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(smell) ⇒ ReekProblem
Returns a new instance of ReekProblem.
| 26 27 28 | # File 'lib/analdiffist/reek_parser.rb', line 26 def initialize smell @smell = smell end | 
Instance Method Details
#context ⇒ Object
| 34 35 36 | # File 'lib/analdiffist/reek_parser.rb', line 34 def context @smell.location["context"] end | 
#description(mode = :added) ⇒ Object
| 46 47 48 | # File 'lib/analdiffist/reek_parser.rb', line 46 def description(mode = :added) "Reek: #{type}" end | 
#diff(other) ⇒ Object
| 38 39 40 | # File 'lib/analdiffist/reek_parser.rb', line 38 def diff other self if other.nil? end | 
#score ⇒ Object
| 42 43 44 | # File 'lib/analdiffist/reek_parser.rb', line 42 def score 2 end | 
#type ⇒ Object
| 30 31 32 | # File 'lib/analdiffist/reek_parser.rb', line 30 def type @smell.subclass.to_s || '' end |