Class: SixthSense::Result::FileReport

Inherits:
Struct
  • Object
show all
Defined in:
lib/sixth_sense/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#axis_scoresObject

Returns the value of attribute axis_scores

Returns:

  • (Object)

    the current value of axis_scores



63
64
65
# File 'lib/sixth_sense/result.rb', line 63

def axis_scores
  @axis_scores
end

#compositeObject

Returns the value of attribute composite

Returns:

  • (Object)

    the current value of composite



63
64
65
# File 'lib/sixth_sense/result.rb', line 63

def composite
  @composite
end

#levelObject

Returns the value of attribute level

Returns:

  • (Object)

    the current value of level



63
64
65
# File 'lib/sixth_sense/result.rb', line 63

def level
  @level
end

#test_fileObject

Returns the value of attribute test_file

Returns:

  • (Object)

    the current value of test_file



63
64
65
# File 'lib/sixth_sense/result.rb', line 63

def test_file
  @test_file
end

#warningsObject

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



63
64
65
# File 'lib/sixth_sense/result.rb', line 63

def warnings
  @warnings
end

Instance Method Details

#findingsObject



71
72
73
# File 'lib/sixth_sense/result.rb', line 71

def findings
  axis_scores.flat_map(&:findings)
end

#to_hObject



75
76
77
78
79
80
81
82
83
# File 'lib/sixth_sense/result.rb', line 75

def to_h
  {
    test_file: test_file.to_h,
    axis_scores: axis_scores.to_h { |score| [score.axis, score.to_h] },
    composite: composite,
    level: level,
    warnings: warnings
  }
end