Closed Zapotek closed 10 months ago
There's a full example in the examples/
directory, it'd look like:
class.define_method("x=", method!(MutPoint::set_x, 1))?;
then from Ruby you'd use it like:
point = Point.new(1, 2)
point.x #=> 1
point.x = 3
point.x #=> 3
Hello,
In the Point example, how would one continue to expose the
set_x
method to Ruby?Cheers!