Class: Rails::Guarddog::Finding
- Inherits:
-
Object
- Object
- Rails::Guarddog::Finding
- Defined in:
- lib/rails/guarddog/finding.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#code_snippet ⇒ Object
Returns the value of attribute code_snippet.
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
-
#message ⇒ Object
Returns the value of attribute message.
-
#remediation ⇒ Object
Returns the value of attribute remediation.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
-
#initialize(severity:, category:, message:, file:, line:, code_snippet: "", remediation: "") ⇒ Finding
constructor
A new instance of Finding.
- #to_h ⇒ Object
Constructor Details
#initialize(severity:, category:, message:, file:, line:, code_snippet: "", remediation: "") ⇒ Finding
Returns a new instance of Finding.
6 7 8 9 10 11 12 13 14 |
# File 'lib/rails/guarddog/finding.rb', line 6 def initialize(severity:, category:, message:, file:, line:, code_snippet: "", remediation: "") @severity = severity @category = category @message = @file = file @line = line @code_snippet = code_snippet @remediation = remediation end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def category @category end |
#code_snippet ⇒ Object
Returns the value of attribute code_snippet.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def code_snippet @code_snippet end |
#file ⇒ Object
Returns the value of attribute file.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def file @file end |
#line ⇒ Object
Returns the value of attribute line.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def line @line end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def @message end |
#remediation ⇒ Object
Returns the value of attribute remediation.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def remediation @remediation end |
#severity ⇒ Object
Returns the value of attribute severity.
4 5 6 |
# File 'lib/rails/guarddog/finding.rb', line 4 def severity @severity end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rails/guarddog/finding.rb', line 16 def to_h { severity: severity, category: category, message: , file: file, line: line, code_snippet: code_snippet, remediation: remediation } end |