Class: Vastlint::Issue
- Inherits:
-
Object
- Object
- Vastlint::Issue
- Defined in:
- lib/vastlint/issue.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
-
#spec_ref ⇒ Object
readonly
Returns the value of attribute spec_ref.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(id:, severity:, message:, path:, spec_ref:, line:, col:) ⇒ Issue
constructor
A new instance of Issue.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(id:, severity:, message:, path:, spec_ref:, line:, col:) ⇒ Issue
Returns a new instance of Issue.
9 10 11 12 13 14 15 16 17 |
# File 'lib/vastlint/issue.rb', line 9 def initialize(id:, severity:, message:, path:, spec_ref:, line:, col:) @id = id @severity = severity @message = @path = path @spec_ref = spec_ref @line = line @col = col end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def col @col end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def id @id end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def @message end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def path @path end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def severity @severity end |
#spec_ref ⇒ Object (readonly)
Returns the value of attribute spec_ref.
7 8 9 |
# File 'lib/vastlint/issue.rb', line 7 def spec_ref @spec_ref end |
Instance Method Details
#as_json ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vastlint/issue.rb', line 19 def as_json(*) { id: id, severity: severity, message: , path: path, spec_ref: spec_ref, line: line, col: col } end |
#to_h ⇒ Object
31 32 33 |
# File 'lib/vastlint/issue.rb', line 31 def to_h as_json end |
#to_json(*args) ⇒ Object
35 36 37 |
# File 'lib/vastlint/issue.rb', line 35 def to_json(*args) JSON.generate(as_json, *args) end |