Class: HTMLProofer::Issue

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, desc, line: nil, status: -1,, content: nil) ⇒ Issue

Returns a new instance of Issue.



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

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

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

#descObject (readonly)

Returns the value of attribute desc.



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

def desc
  @desc
end

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/html-proofer/issue.rb', line 15

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