As noted in the comments, the question is actually the answer.
If the method gets a block, I want to use it further. But I also have a variant where the block isn’t needed. Can I do this in any way?
For example:
def maybe_gets_block(&blk)
if blk
STDERR.puts "Yay! I’ve got a block!"
@callback = blk
else
STDERR.puts "I don’t have a block"
@callback = nil
end
end