foo()
is equivilant to foo
Also, code blocks are specified outside the function argument list. Something that looks like this in javascript: foo(a,b,c,d,function() {
console.log("some callback")
})
would look like this in Ruby: foo(a,b,c,d) do
puts "some callback"
end
or even just: foo(a,b,c,d) { puts "some callback" }
That last one isn't a function definition.. it's a function call equivalent to the example before it.It's mostly the fact that it -looks- cleaner in all the right places that makes it appealing. That and the massively powerful web framework built on top of it.