How to require a block in Ruby?

前端 未结 3 1395
长情又很酷
长情又很酷 2021-01-01 13:47

Is there any built in way to require that a block be passed to a Ruby method? I realize I can just raise an exception if block_given? is false, but is there so

3条回答
提交回复
热议问题