C
CBlair1986
Hello all. I've got a somewhat unique problem, I think. I have a list
of classes planned out, with the attributes needed for them and
everything else, but I want to figure out how the classes should relate
to one another, so that I don't need to needlessly repeat myself.
For instance, say I have the classes planned as such:
class Apple
attr_accessor :taste, :type, :flavor, :flesh, ...
end
class Orange
attr_accessor :taste, :type, :flavor, eel, ...
end
and so on.
How would I go about fitting these together, so that I could have more
general classes such as Fruit and Vegetable and so on?
Thank you!
of classes planned out, with the attributes needed for them and
everything else, but I want to figure out how the classes should relate
to one another, so that I don't need to needlessly repeat myself.
For instance, say I have the classes planned as such:
class Apple
attr_accessor :taste, :type, :flavor, :flesh, ...
end
class Orange
attr_accessor :taste, :type, :flavor, eel, ...
end
and so on.
How would I go about fitting these together, so that I could have more
general classes such as Fruit and Vegetable and so on?
Thank you!