lib/outliers/run.rb in outliers-0.3.3 vs lib/outliers/run.rb in outliers-0.5.0.beta1

- old
+ new

@@ -1,8 +1,8 @@ module Outliers class Run - attr_accessor :credentials, :results, :threads, :threaded, :thread_count + attr_accessor :account, :results, :threads, :threaded, :thread_count def initialize(options={}) @results = [] @threads = [] @threaded = false @@ -27,17 +27,23 @@ sleep 2 end evaluation = Proc.new { Evaluation.new(:name => name, :run => self).instance_eval &block } + if name + logger.info "Loading evaluation '#{name}'." + else + logger.info "Loading unnamed evaluation." + end + threaded ? threads << Thread.new { evaluation.call } : evaluation.call end - def passed + def passing_results @results.select {|r| r.passed?} end - def failed + def failing_results @results.reject {|r| r.passed?} end private