/*
 * Create a new Object in the world.
 *
 * Pass the name of the class of object to create. Returns the
 * new Object.
 *
 *   # Create a new object of class 'Spaceship'
 *
 *   obj = world.new_object('Spaceship')
 */

static VALUE world_new_object(VALUE self, VALUE classname)
{
	IrmoWorld *world = unwrap_world(self);
	IrmoObject *obj;

	obj = irmo_object_new(world, STR2CSTR(classname));

	if (!obj)
		rb_raise(rb_eNameError, "%s", irmo_error_get());

	return wrap_object(obj);
}