From 9750e0309500259e9a56e267ce87984fb5bb5e53 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 26 Nov 2018 15:29:26 +0000 Subject: clean out; better response codes; prepare for batch --- prediction.rb | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 prediction.rb (limited to 'prediction.rb') diff --git a/prediction.rb b/prediction.rb new file mode 100644 index 0000000..afceb08 --- /dev/null +++ b/prediction.rb @@ -0,0 +1,35 @@ +module OpenTox + + class Prediction + + include OpenTox + include Mongoid::Document + include Mongoid::Timestamps + store_in collection: "predictions" + field :compound, type: BSON::ObjectId + field :model, type: BSON::ObjectId + field :prediction, type: Hash, default:{} + field :csv, type: String + + attr_accessor :compound, :model, :prediction, :csv + + def compound + self[:compound] + end + + def model + self[:model] + end + + def prediction + self[:prediction] + end + + def csv + self[:csv] + end + + end + +end + -- cgit v1.2.3