Class: HTML::Proofer::CheckRunner::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/html/proofer/check_runner/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, desc, line_number = nil, status = -1)) ⇒ Issue

Returns a new instance of Issue.


7
8
9
10
11
12
# File 'lib/html/proofer/check_runner/issue.rb', line 7

def initialize(path, desc, line_number = nil, status = -1)
  @line_number = line_number.nil? ? '' : " (line #{line_number})"
  @path = path
  @desc = desc
  @status = status
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc


5
6
7
# File 'lib/html/proofer/check_runner/issue.rb', line 5

def desc
  @desc
end

#line_numberObject (readonly)

Returns the value of attribute line_number


5
6
7
# File 'lib/html/proofer/check_runner/issue.rb', line 5

def line_number
  @line_number
end

#pathObject (readonly)

Returns the value of attribute path


5
6
7
# File 'lib/html/proofer/check_runner/issue.rb', line 5

def path
  @path
end

#statusObject (readonly)

Returns the value of attribute status


5
6
7
# File 'lib/html/proofer/check_runner/issue.rb', line 5

def status
  @status
end

Instance Method Details

#to_sObject


14
15
16
# File 'lib/html/proofer/check_runner/issue.rb', line 14

def to_s
  "#{@path}: #{@desc}#{@line_number}"
end