class CodeAnalyzer::Warning

Warning is the violation.

it indicates the filenname, line number and error message for the violation.

Attributes

filename[R]
line_number[R]
message[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/code_analyzer/warning.rb, line 10
def initialize(options = {})
  @filename = options[:filename]
  @line_number = options[:line_number].to_s
  @message = options[:message]
end

Public Instance Methods

to_s() click to toggle source
# File lib/code_analyzer/warning.rb, line 16
def to_s
  "#{@filename}:#{@line_number} - #{@message}"
end