Sha256: cce1abdbd8fbef2d0f5c82ddfbe42b0b4e1e76427030d09e138b541c9978d291

Contents?: true

Size: 366 Bytes

Versions: 14

Compression:

Stored size: 366 Bytes

Contents

module Reek
  # Is was easier this way
  class SmellWarning
    def klass
      @location[CONTEXT_KEY][/^([\w:]*)(#\w*)?/, 1]
    end

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

    def smell_string
      "#{smell_method} #{@smell['message']} (#{@smell['subclass']}) at lines #{Array(@location['lines'])*','}"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
preek-1.5.1 lib/preek/ext/smell_warning.rb
preek-1.5.0 lib/preek/ext/smell_warning.rb
preek-1.4.3 lib/preek/ext/smell_warning.rb
preek-1.4.2 lib/preek/ext/smell_warning.rb
preek-1.4.1 lib/preek/ext/smell_warning.rb
preek-1.4.0 lib/preek/ext/smell_warning.rb
preek-1.3.2 lib/preek/ext/smell_warning.rb
preek-1.3.1 lib/preek/ext/smell_warning.rb
preek-1.2.1 lib/preek/ext/smell_warning.rb
preek-1.1.0 lib/preek/ext/smell_warning.rb
preek-1.0.0 lib/preek/ext/smell_warning.rb
preek-0.1.3 lib/preek/smell_warning.rb
preek-0.1.2 lib/preek/smell_warning.rb
preek-0.1.1 lib/preek/smell_warning.rb