diff options
author | gebele <gebele@in-silico.ch> | 2016-12-12 09:15:48 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2016-12-12 09:15:48 +0000 |
commit | da086fad5b45c0d7b59feb40d0108ac620613933 (patch) | |
tree | 7e9cf8c9332e30552ab255ee9b30e04e904977b4 /lib/feature.rb | |
parent | 32a16d99b51642cac8e75f90c43753d8d05ab770 (diff) | |
parent | 4570f11444bc10da88d849e9a2812e95a8933c8a (diff) |
merged development
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index b58946b..0ca4d41 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -2,27 +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 @@ -34,12 +35,4 @@ module OpenTox end end - # Feature for categorical bioassay results - class NominalBioAssay < NominalFeature - end - - # Feature for quantitative bioassay results - class NumericBioAssay < NumericFeature - end - end |