Coming from a Python background, where there is always a "right way to do it" (a "Pythonic" way, if you will) when it comes to style, I'm wondering if the same exists for Ruby. I've kind of been using my own style guidelines but I'm thinking about releasing my source code, and I'd like it to adhere to any unwritten rules that might exist.
So my question is: Is it "The Ruby Way" to explicitly type out return
in methods? I've seen it done with and without, but is there a "right way" to do it? Is there maybe a "right time" to do it? For example:
def some_func(arg1, arg2, etc)
value = arg1 + arg2 + etc #or whatever
# Do some stuff...
return value # <-- Is the 'return' needed here?
end