From b7e1a4bb8b8e47326928171044c0d7b54d62e278 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 6 Nov 2017 11:21:18 +0000 Subject: added prediction objects;re-ordered code and cleanup --- prediction.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 prediction.rb (limited to 'prediction.rb') diff --git a/prediction.rb b/prediction.rb new file mode 100644 index 0000000..4e46d52 --- /dev/null +++ b/prediction.rb @@ -0,0 +1,30 @@ +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:{} + + attr_accessor :compound, :model, :prediction + + def compound + self[:compound] + end + + def model + self[:model] + end + + def prediction + self[:prediction] + end + + end + +end + -- cgit v1.2.3