Class: ActiveRecordSaferQuery::Checker::Finding
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecordSaferQuery::Checker::Finding
- Defined in:
- lib/active_record_safer_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
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def line @line end |
#message ⇒ Object
Returns the value of attribute message
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def @message end |
#path ⇒ Object
Returns the value of attribute path
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def path @path end |
#rule ⇒ Object
Returns the value of attribute rule
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def rule @rule end |
#severity ⇒ Object
Returns the value of attribute severity
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def severity @severity end |
#source ⇒ Object
Returns the value of attribute source
51 52 53 |
# File 'lib/active_record_safer_query/checker.rb', line 51 def source @source end |
Instance Method Details
#fail_at?(threshold) ⇒ Boolean
63 64 65 |
# File 'lib/active_record_safer_query/checker.rb', line 63 def fail_at?(threshold) Checker::SEVERITY_RANK.fetch(severity) >= Checker::SEVERITY_RANK.fetch(threshold) end |
#to_h ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/active_record_safer_query/checker.rb', line 52 def to_h { path: path, line: line, severity: severity, rule: rule, message: , source: source } end |