I have the following code example:
drop_class = eval "class #{self}::LiquidDropClass < Liquid::Drop; self; end"
I understand what it's doing, but I don't understand why self is returned within the class definition. Is this even necessary, or is it an artefact of the eval class definition method?
In this case, methods are added later on to the class.
UPDATE My confusion is around this:
class XYZ:::LiquidDropClass < Liquid::Drop
end
vs
eval "class XYZ::LiquidDropClass < Liquid::Drop; self; end"
I don't need the self in the first example and the class is created fine.