4/20/2008

Return Value

What is the value returned from function in ruby?

It is not important which is method or local function.

The ruby's manual says that the value returned is result of last computed in function.

In fact, If you want to write a function to carry back a handle, you have to type next code.


def function()
  handle = Yourclass.new()
  handle
end

No comments: