Class: Scryer::Finding

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



6
7
8
# File 'lib/scryer/finding.rb', line 6

def category
  @category
end

#code_snippetObject

Returns the value of attribute code_snippet

Returns:

  • (Object)

    the current value of code_snippet



6
7
8
# File 'lib/scryer/finding.rb', line 6

def code_snippet
  @code_snippet
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



6
7
8
# File 'lib/scryer/finding.rb', line 6

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



6
7
8
# File 'lib/scryer/finding.rb', line 6

def line
  @line
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



6
7
8
# File 'lib/scryer/finding.rb', line 6

def message
  @message
end

#rule_idObject

Returns the value of attribute rule_id

Returns:

  • (Object)

    the current value of rule_id



6
7
8
# File 'lib/scryer/finding.rb', line 6

def rule_id
  @rule_id
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



6
7
8
# File 'lib/scryer/finding.rb', line 6

def severity
  @severity
end

#suggested_fixObject

Returns the value of attribute suggested_fix

Returns:

  • (Object)

    the current value of suggested_fix



6
7
8
# File 'lib/scryer/finding.rb', line 6

def suggested_fix
  @suggested_fix
end

Instance Method Details

#to_hObject



17
18
19
# File 'lib/scryer/finding.rb', line 17

def to_h
  super.transform_keys(&:to_s)
end