Determine type of class

I wrote a graphical library with all kinds of draw elements and during the output phase a big case switch is used to determine what to draw based on the given draw element.
The class hierarchy is something like

module XYZ
  class DrawElement
   ...
  end

  class DrawSuperPenPath < DrawElement
    ...
  end

  class DrawShade < DrawElement
    ...
  end
  ... etc ..
end

and per element a different draw routine is used.