diff options
author | gebele <gebele@in-silico.ch> | 2017-01-18 14:17:02 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-01-18 14:17:02 +0000 |
commit | dd8b986e198552ce865aa5500335043f60a0eef3 (patch) | |
tree | f5c06159d0a529f263ea25f6354f89825fc41410 /lib/feature.rb | |
parent | 76912e72cf52c2a10423226ababb2b6d7f4b84ca (diff) | |
parent | d7504cc422bbaeee3546589d87e7baeb4e977c0b (diff) |
fixed merge
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 0ca4d41..f811aef 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -8,10 +8,14 @@ module OpenTox field :unit, type: String field :conditions, type: Hash + # Is it a nominal feature + # @return [TrueClass,FalseClass] def nominal? self.class == NominalFeature end + # Is it a numeric feature + # @return [TrueClass,FalseClass] def numeric? self.class == NumericFeature end @@ -30,6 +34,9 @@ module OpenTox class Smarts < NominalFeature field :smarts, type: String index "smarts" => 1 + # Create feature from SMARTS string + # @param [String] + # @return [OpenTox::Feature] def self.from_smarts smarts self.find_or_create_by :smarts => smarts end |