lib/attractor/suggester.rb in attractor-1.1.0 vs lib/attractor/suggester.rb in attractor-1.1.1
- old
+ new
@@ -2,10 +2,10 @@
module Attractor
# makes suggestions for refactorings
class Suggester
def initialize(values)
- @values = values
+ @values = values || []
end
def suggest(threshold = 95)
products = @values.map { |val| val.churn * val.complexity }
products.extend(DescriptiveStatistics)