Class: ActiveRecordSaferLookupQuery::Checker::Finding
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecordSaferLookupQuery::Checker::Finding
- Defined in:
- lib/active_record_safer_lookup_query/checker.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
-
#message ⇒ Object
Returns the value of attribute message.
-
#path ⇒ Object
Returns the value of attribute path.
-
#rule ⇒ Object
Returns the value of attribute rule.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def line @line end |
#message ⇒ Object
Returns the value of attribute message
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def @message end |
#path ⇒ Object
Returns the value of attribute path
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def path @path end |
#rule ⇒ Object
Returns the value of attribute rule
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def rule @rule end |
#severity ⇒ Object
Returns the value of attribute severity
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def severity @severity end |
#source ⇒ Object
Returns the value of attribute source
57 58 59 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 57 def source @source end |
Instance Method Details
#fail_at?(threshold) ⇒ Boolean
69 70 71 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 69 def fail_at?(threshold) Checker::SEVERITY_RANK.fetch(severity) >= Checker::SEVERITY_RANK.fetch(threshold) end |
#to_h ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/active_record_safer_lookup_query/checker.rb', line 58 def to_h { path: path, line: line, severity: severity, rule: rule, message: , source: source } end |