Methods and blocks
Methods are defined with def. Blocks are anonymous chunks of code passed to methods using do/end or { }. Blocks are central to idiomatic Ruby.
Methods are defined with def. Blocks are anonymous chunks of code passed to methods using do/end or { }. Blocks are central to idiomatic Ruby.