Callables in Ruby
24 Feb 2016In Ruby there are several objects that respond to call
. I usually refer to them as callables:
- Proc
- Lambda
- Method
There are various ways that you can invoke those callables:
.call()
[]
.()
.===
I’ve talked about the case equality operator ===
over here.
But what about the other ones? IMHO you should stick to .call()
because it does not require knowledge about
a special syntax.