diff options
author | gebele <gebele@in-silico.ch> | 2017-11-06 11:21:18 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-11-06 11:21:18 +0000 |
commit | b7e1a4bb8b8e47326928171044c0d7b54d62e278 (patch) | |
tree | d9b8bb742cd359f300d20965816333cd527aa155 /prediction.rb | |
parent | 2d19e8a294b0c95a4b49d963f383b9b9b3918ea0 (diff) |
added prediction objects;re-ordered code and cleanup
Diffstat (limited to 'prediction.rb')
-rw-r--r-- | prediction.rb | 30 |
1 files changed, 30 insertions, 0 deletions
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 + |