diff options
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index c6fb68a..0ca4d41 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -2,30 +2,28 @@ module OpenTox # Basic feature class class Feature - field :nominal, type: Boolean - field :numeric, type: Boolean field :measured, type: Boolean field :calculated, type: Boolean field :category, type: String field :unit, type: String field :conditions, type: Hash + + def nominal? + self.class == NominalFeature + end + + def numeric? + self.class == NumericFeature + end end # Feature for categorical variables class NominalFeature < Feature field :accept_values, type: Array - def initialize params - super params - nominal = true - end end # Feature for quantitative variables class NumericFeature < Feature - def initialize params - super params - numeric = true - end end # Feature for SMARTS fragments |