diff options
author | gebele <gebele@in-silico.ch> | 2016-12-12 09:15:48 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2016-12-12 09:15:48 +0000 |
commit | da086fad5b45c0d7b59feb40d0108ac620613933 (patch) | |
tree | 7e9cf8c9332e30552ab255ee9b30e04e904977b4 /lib/opentox.rb | |
parent | 32a16d99b51642cac8e75f90c43753d8d05ab770 (diff) | |
parent | 4570f11444bc10da88d849e9a2812e95a8933c8a (diff) |
merged development
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 11 |
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 - |