ext/rays/font.cpp in rays-0.1.2 vs ext/rays/font.cpp in rays-0.1.3

- old
+ new

@@ -1,10 +1,10 @@ #include "rays/ruby/font.h" #include <rucy.h> -#include "rays.h" +#include "defs.h" using namespace Rucy; using Rays::coord; @@ -12,15 +12,16 @@ namespace Rays { + static Class cFont; + Class font_class () { - static Class c = rays_module().define_class("Font"); - return c; + return cFont; } }// Rays @@ -113,13 +114,17 @@ void Init_font () { - Rays::font_class() - .define_alloc_func(alloc) - .define_method("initialize", initialize) - .define_method("name", name) - .define_method("size", size) - .define_method("width", width) - .define_method("height", height); + Module m = define_module("Rays"); + + Class c = m.define_class("Font"); + Rays::cFont = c; + + c.define_alloc_func(alloc); + c.define_method("initialize", initialize); + c.define_method("name", name); + c.define_method("size", size); + c.define_method("width", width); + c.define_method("height", height); }