3 ms·
The original use cae was where you have a method chain and you want to "tap into" one of the values, e.g. foo().bar().blitz() becomes: foo().bar().ta
by raganwald 17y ago
The original use cae was where you have a method chain and you want to "tap into" one of the values, e.g.
foo().bar().blitz()
becomes:
foo().bar().tap { |b| puts b.inspect }.blitz()
It takes its inspiration from Unix's "tee."