All was well until unique individuals were implemented, making the Dataset model class a true mess of methods doing similar things to each kind of individual. As a result, it is truly painful to do anything on that class, even searching for methods.
A means to fix this problem is to create subclasses to Dataset, perhaps Individual, and remove from the superclass anything that can be moved to it. Individual class would be a generic class for all kinds of individuals the application needs to treat uniquely, regardless of how it is designed presently.
class Individual < Dataset
def initialize( ontological_class )
model.find_individual( ontclass: ontological_class ) # from superclass
end
# ...
end
All was well until unique individuals were implemented, making the
Dataset
model class a true mess of methods doing similar things to each kind of individual. As a result, it is truly painful to do anything on that class, even searching for methods. A means to fix this problem is to create subclasses toDataset
, perhapsIndividual
, and remove from the superclass anything that can be moved to it.Individual
class would be a generic class for all kinds of individuals the application needs to treat uniquely, regardless of how it is designed presently.