summaryrefslogtreecommitdiff
path: root/lib/opentox.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-12-12 09:15:48 +0000
committergebele <gebele@in-silico.ch>2016-12-12 09:15:48 +0000
commitda086fad5b45c0d7b59feb40d0108ac620613933 (patch)
tree7e9cf8c9332e30552ab255ee9b30e04e904977b4 /lib/opentox.rb
parent32a16d99b51642cac8e75f90c43753d8d05ab770 (diff)
parent4570f11444bc10da88d849e9a2812e95a8933c8a (diff)
merged development
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r--lib/opentox.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb
index 186c87a..5c300cf 100644
--- a/lib/opentox.rb
+++ b/lib/opentox.rb
@@ -1,8 +1,6 @@
module OpenTox
- # Ruby interface
-
- # create default OpenTox classes (defined in opentox-client.rb)
+ # create default OpenTox classes
# provides Mongoid's query and persistence methods
# http://mongoid.org/en/mongoid/docs/persistence.html
# http://mongoid.org/en/mongoid/docs/querying.html
@@ -13,10 +11,15 @@ module OpenTox
include Mongoid::Timestamps
store_in collection: klass.downcase.pluralize
field :name, type: String
+ field :source, type: String
field :warnings, type: Array, default: []
+
+ def warn warning
+ $logger.warn warning
+ warnings << warning
+ end
end
OpenTox.const_set klass,c
end
end
-