M
Michael Winterstein
Suppose I have a module that's essentially used as a namespace, like
this:
module Castle
class King < Royalty; end
class Queen < Royalty; end
class Guard < Commoner; end
class Dragon_keeper < Commoner; end
end
Is there some way I could later create a list, say Castle_dwellers that
would come out with all the classes defined therein? I would expect an
array, something like [:King,:Queen,:Guard,ragon_keeper]. Or would I
have to add them 'manually' to the list?
this:
module Castle
class King < Royalty; end
class Queen < Royalty; end
class Guard < Commoner; end
class Dragon_keeper < Commoner; end
end
Is there some way I could later create a list, say Castle_dwellers that
would come out with all the classes defined therein? I would expect an
array, something like [:King,:Queen,:Guard,ragon_keeper]. Or would I
have to add them 'manually' to the list?