diff options
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 9deb199..b2bc1f5 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -29,6 +29,9 @@ module OpenTox # Feature for SMARTS fragments class Smarts < NominalFeature field :smarts, type: String + def self.from_smarts smarts + self.find_or_create_by :smarts => smarts + end end # Feature for supervised fragments from Fminer algorithm |