Class: Pinspec::Emit::StabilityFilter::Report

Inherits:
Data
  • Object
show all
Defined in:
lib/pinspec/emit/stability_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#compared_fieldsObject (readonly)

Returns the value of attribute compared_fields

Returns:

  • (Object)

    the current value of compared_fields



26
27
28
# File 'lib/pinspec/emit/stability_filter.rb', line 26

def compared_fields
  @compared_fields
end

#runsObject (readonly)

Returns the value of attribute runs

Returns:

  • (Object)

    the current value of runs



26
27
28
# File 'lib/pinspec/emit/stability_filter.rb', line 26

def runs
  @runs
end

#verdictsObject (readonly)

Returns the value of attribute verdicts

Returns:

  • (Object)

    the current value of verdicts



26
27
28
# File 'lib/pinspec/emit/stability_filter.rb', line 26

def verdicts
  @verdicts
end

Instance Method Details

#causesObject



35
36
37
# File 'lib/pinspec/emit/stability_filter.rb', line 35

def causes
  unstable.group_by(&:cause).transform_values(&:size)
end

#nothing_to_pin?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/pinspec/emit/stability_filter.rb', line 39

def nothing_to_pin?
  stable.empty?
end

#stableObject



27
28
29
# File 'lib/pinspec/emit/stability_filter.rb', line 27

def stable
  verdicts.select(&:stable?)
end

#unstableObject



31
32
33
# File 'lib/pinspec/emit/stability_filter.rb', line 31

def unstable
  verdicts.reject(&:stable?)
end