1require 'ffi' 2 3class Greeting 4 extend FFI::Library 5 ffi_lib 'greeting' 6 attach_function :greet, [:string], :string 7end 8 9puts Greeting.greet('mo')