Derive and proc macros for magnus.
Derive and proc macros for magnus.
#[magnus::wrap(class = "RbPoint", free_immediately, size)]
struct Point {
x: isize,
y: isize,
}
#[magnus::init]
fn init(ruby: &magnus::Ruby) -> Result<(), magnus::Error> {
ruby.define_class("RbPoint", ruby.class_object())?;
Ok(())
}