I have the following lines of code in my test_func.rb
require 'inline'
class TestFunc
inline do |builder|
builder.c '
int testfunc() {
return 0;
}'
end
end
I am able to call the function only from an object and not class.
I can call it as,
obj = TestFunc.new
obj.testfunc()
But how should i declare so that i can call as,
TestFunc.testfunc()