lib/fitting/storage/responses.rb in fitting-1.6.2 vs lib/fitting/storage/responses.rb in fitting-2.0.0
- old
+ new
@@ -1,21 +1,26 @@
module Fitting
module Storage
- module Responses
- class << self
- def push(test)
- @responses ||= []
- @responses.push(test)
- end
+ class Responses
+ def initialize
+ @responses = []
+ end
- def all
- @responses ||= []
- @responses.uniq
- end
+ def add(response)
+ @responses.push(
+ Fitting::Response.new(
+ response,
+ Fitting::Storage::Documentation.tomogram))
+ end
- def nil?
- @responses.nil?
- end
+ def statistics
+ Fitting::Statistics.new(
+ Fitting::Documentation.new(
+ Fitting::Storage::Documentation.tomogram,
+ Fitting.configuration.white_list),
+ @responses.uniq,
+ Fitting.configuration.strict
+ )
end
end
end
end