Draw geometry from script

Is it possible to create geometry from a script?
Is it possible to output geometry as a script?

Regarding the first question, certainly. Look up the SketchUp Ruby API.
Regarding the second question, I don’t know what you mean. Geometry consists of model entities. A script is a program, not entities. Do you mean save your geometry as a SketchUp model from a Ruby program? If so, then yes.