1 2 3 4 5 6 7 8 9 10 11 12 13
use crate::load::MrbLoadSources; use crate::Mrb; use crate::MrbError; pub fn init(interp: &Mrb) -> Result<(), MrbError> { interp .borrow_mut() .def_class::<OpenStruct>("OpenStruct", None, None); interp.def_rb_source_file("ostruct.rb", include_str!("ostruct.rb"))?; Ok(()) } pub struct OpenStruct;