2010-05-08 13:58:43 -04:00
|
|
|
#include "rr.h"
|
|
|
|
|
2010-05-10 08:56:52 -04:00
|
|
|
VALUE rr_define_class(const char *name, VALUE superclass) {
|
2010-05-08 13:58:43 -04:00
|
|
|
VALUE V8 = rb_define_module("V8");
|
|
|
|
VALUE V8_C = rb_define_module_under(V8, "C");
|
2010-05-10 08:56:52 -04:00
|
|
|
return rb_define_class_under(V8_C, name, superclass);
|
2010-05-10 09:28:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
VALUE rr_str_to_perl_case(VALUE str) {
|
|
|
|
VALUE V8 = rb_define_module("V8");
|
|
|
|
VALUE to = rb_define_module_under(V8, "To");
|
|
|
|
return rb_funcall(to, rb_intern("perl_case"), 1, str);
|
|
|
|
}
|
|
|
|
|
|
|
|
VALUE rr_str_to_camel_case(VALUE str) {
|
|
|
|
VALUE V8 = rb_define_module("V8");
|
|
|
|
VALUE to = rb_define_module_under(V8, "To");
|
|
|
|
return rb_funcall(to, rb_intern("camel_case"), 1, str);
|
|
|
|
}
|