public mRubyModule(RubyState state, string name) { this.name = name; this.state = state; this.module_ptr = RubyDLL.r_define_module(state.rb_state, name); this.module_value = R_VAL.CreateOBJ(module_ptr); }
/// <summary> /// 定义一个新Class,默认继承自mruby的Object /// </summary> public mRubyClass(RubyState state, string name) { mRubyClass.RegisteredClass.Add(name, this); this.name = name; this.state = state; this.class_ptr = RubyDLL.r_define_class(state, name, state.rb_object_class); this.class_value = R_VAL.CreateOBJ(class_ptr); }