Class: SixthSense::Result::AxisScore

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#axisObject

Returns the value of attribute axis

Returns:

  • (Object)

    the current value of axis



40
41
42
# File 'lib/sixth_sense/result.rb', line 40

def axis
  @axis
end

#confidenceObject

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



40
41
42
# File 'lib/sixth_sense/result.rb', line 40

def confidence
  @confidence
end

#findingsObject

Returns the value of attribute findings

Returns:

  • (Object)

    the current value of findings



40
41
42
# File 'lib/sixth_sense/result.rb', line 40

def findings
  @findings
end

#measuredObject

Returns the value of attribute measured

Returns:

  • (Object)

    the current value of measured



40
41
42
# File 'lib/sixth_sense/result.rb', line 40

def measured
  @measured
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



40
41
42
# File 'lib/sixth_sense/result.rb', line 40

def value
  @value
end

Instance Method Details

#measured?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/sixth_sense/result.rb', line 48

def measured?
  measured != false && !value.nil?
end

#to_hObject



52
53
54
55
56
57
58
59
60
# File 'lib/sixth_sense/result.rb', line 52

def to_h
  {
    axis: axis,
    value: value,
    confidence: confidence,
    measured: measured?,
    findings: findings.map(&:to_h)
  }
end