Class: RSpec::Covers::Tracer::Suggestion

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/covers/tracer/suggestion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



6
7
8
# File 'lib/rspec/covers/tracer/suggestion.rb', line 6

def label
  @label
end

#reasonsObject

Returns the value of attribute reasons

Returns:

  • (Object)

    the current value of reasons



6
7
8
# File 'lib/rspec/covers/tracer/suggestion.rb', line 6

def reasons
  @reasons
end

#scoreObject

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



6
7
8
# File 'lib/rspec/covers/tracer/suggestion.rb', line 6

def score
  @score
end

Instance Method Details

#to_hObject



7
8
9
10
11
12
13
# File 'lib/rspec/covers/tracer/suggestion.rb', line 7

def to_h
  {
    label: label,
    score: score.round(4),
    reasons: reasons
  }
end