From: Gavin Sinclair Date: 2012-01-30T22:31:54+09:00 Subject: Re: A little assistance please :) On Fri, Jan 27, 2012 at 7:56 AM, Chad Perrin wrote: > You're right, that's much better -- apart from the fact I have yet to > come up with a single good reason for dynamic class names. A pre-pre-alpha project of mine -- http://github.com/gsinclair/rgeom -- implements a DSL to describe geometric shapes, which can then be rendered into an image, given appropriate inputs. (The DSL describes the inputs etc.) e.g. shape :polygon, ... { definition stuff I can't even remember } ... The effect of that is to create a class called RGeom::Shape::Polygon with some methods defined. It all uses eval or class_eval or whatever. That class _needs_ to be named class because more methods need to be defined. So you need to be able to do class RGeom::Shape::Polygon def construct(parameters) ... end # etc. end Maybe there's some other way I could do it that doesn't need a dynamically named class, but I sure ain't looking for a different way. Gavin