diff options
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index 186c87a..7d8a8a2 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -13,7 +13,13 @@ 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 |