From 85553b339acf3f9285a1c03b2fff342d9ddb9b6b Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 11 Jan 2017 16:00:07 +0100 Subject: documentation for all classes --- lib/feature.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/feature.rb') 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 -- cgit v1.2.3