lib/attractor/reporters/reporter.rb in attractor-0.3.4 vs lib/attractor/reporters/reporter.rb in attractor-0.4.0

- old
+ new

@@ -7,11 +7,11 @@ module Attractor # base reporter class Reporter extend Forwardable - attr_accessor :values, :suggestions + attr_accessor :values def_delegator :@watcher, :watch def initialize(file_prefix: '') @calculator = Calculator.new(file_prefix: file_prefix) @values = @calculator.calculate @@ -20,19 +20,20 @@ @watcher = Watcher.new(file_prefix, lambda do report end) end + def suggestions(quantile) + @suggestions = @suggester.suggest(quantile) + @suggestions + end + def report @suggestions = @suggester.suggest end def render 'Attractor' - end - - def serve - @suggestions = @suggester.suggest end end # console reporter class ConsoleReporter < Reporter