F
Fritz Trapper
I want to pass a reference to function as parameter to another function
and execute the passed function. Somthing like this:
def executer(func)
func(1)
end
def test(x)
p x
end
executer(test)
How to write this correctly in ruby?
and execute the passed function. Somthing like this:
def executer(func)
func(1)
end
def test(x)
p x
end
executer(test)
How to write this correctly in ruby?