whoami7 - Manager
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
opt
/
alt
/
ruby32
/
share
/
gems
/
gems
/
bundler-2.4.19
/
lib
/
bundler
/
templates
/
newgem
/
ext
/
newgem
/
src
/
Upload File:
files >> //proc/thread-self/root/proc/self/root/proc/self/root/opt/alt/ruby32/share/gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt
use magnus::{function, prelude::*, Error, Ruby}; fn hello(subject: String) -> String { format!("Hello from Rust, {subject}!") } #[magnus::init] fn init(ruby: &Ruby) -> Result<(), Error> { let module = ruby.<%= config[:constant_array].map {|c| "define_module(#{c.dump})?"}.join(".") %>; module.define_singleton_method("hello", function!(hello, 1))?; Ok(()) }
Copyright ©2021 || Defacer Indonesia