Class: Scryer::Finding
- Inherits:
-
Struct
- Object
- Struct
- Scryer::Finding
- Defined in:
- lib/scryer/finding.rb
Overview
A single reported issue. suggested_fix is always a human-reviewable text
explanation + example patch, never something auto-applied — see the
gem's README for why (a rewritten line that changes behavior needs a
human's judgment, especially for security-sensitive code).
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.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#suggested_fix ⇒ Object
Returns the value of attribute suggested_fix.
Instance Method Summary collapse
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def category @category end |
#code_snippet ⇒ Object
Returns the value of attribute code_snippet
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def code_snippet @code_snippet end |
#file ⇒ Object
Returns the value of attribute file
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def file @file end |
#line ⇒ Object
Returns the value of attribute line
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def line @line end |
#message ⇒ Object
Returns the value of attribute message
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def @message end |
#rule_id ⇒ Object
Returns the value of attribute rule_id
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def rule_id @rule_id end |
#severity ⇒ Object
Returns the value of attribute severity
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def severity @severity end |
#suggested_fix ⇒ Object
Returns the value of attribute suggested_fix
6 7 8 |
# File 'lib/scryer/finding.rb', line 6 def suggested_fix @suggested_fix end |
Instance Method Details
#to_h ⇒ Object
17 18 19 |
# File 'lib/scryer/finding.rb', line 17 def to_h super.transform_keys(&:to_s) end |