For an array <<
is the append method. It adds an item to the end of the array.
So in your specific case when you call setup
with a block the Proc
object made from the block is stored in @setups
.
Note: as sbeam points out in his comment, because <<
is a method, it can do different things depending on the type of object it is called on e.g. concatenation on strings, bit shifting on integers etc.
See the "ary << obj → ary" documentation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…