Sha256: 7a39da43692cf2cf09c242cdeb86fec99b03e7b29be5ecb2f694ceaff93daa59

Contents?: true

Size: 477 Bytes

Versions: 4

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

module CodeAnalyzer
  # Warning is the violation.
  #
  # it indicates the filenname, line number and error message for the violation.
  class Warning
    attr_reader :filename, :line_number, :message

    def initialize(options = {})
      @filename = options[:filename]
      @line_number = options[:line_number].to_s
      @message = options[:message]
    end

    def to_s
      "#{@filename}:#{@line_number} - #{@message}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
code_analyzer-0.5.5 lib/code_analyzer/warning.rb
code_analyzer-0.5.4 lib/code_analyzer/warning.rb
code_analyzer-0.5.3 lib/code_analyzer/warning.rb
code_analyzer-0.5.2 lib/code_analyzer/warning.rb