Class: RSpec::Risky::StaticDetector::Finding

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/risky/static_detector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#evidenceObject

Returns the value of attribute evidence

Returns:

  • (Object)

    the current value of evidence



12
13
14
# File 'lib/rspec/risky/static_detector.rb', line 12

def evidence
  @evidence
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



12
13
14
# File 'lib/rspec/risky/static_detector.rb', line 12

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



12
13
14
# File 'lib/rspec/risky/static_detector.rb', line 12

def line
  @line
end

#ruleObject

Returns the value of attribute rule

Returns:

  • (Object)

    the current value of rule



12
13
14
# File 'lib/rspec/risky/static_detector.rb', line 12

def rule
  @rule
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
19
20
21
# File 'lib/rspec/risky/static_detector.rb', line 13

def to_h
  {
    file: file,
    line: line,
    location: "#{file}:#{line}",
    rule: rule,
    evidence: evidence
  }
end