You cannot inherit or sub-class the DrawingElement type of classes we provide. They are defined in C in such a way that it's not possible.
Further more, we don't condone this - nor do we allow extensions that modify the Ruby or our Ruby API classes to be submitted to the Extension Warehouse.
The reason for this is that if people modified existing methods they would break the behaviour we promise with our API and it would be impossible to develop for the Ruby API as all extensions share the same environment.
We also don't allow people to add methods to our classes or modules because:
- It'd be the same as adding methods to the global namespace. What if someone else implement a Entities.add_sphere? Then there'd be a conflict.
- We reserve the namespace for us. Maybe we would like to implement an add_sphere method - in which case we wouldn't want it overridden by third party extensions.
So you should instead be writing it with an alternative syntax. Make a method that accepts the Entities object where the sphere will be added. It's not as pretty, but for the sake of integrity and the sanity of the developers that use the API it's the way to go.



