# You use the yield statement, which is designed for exactly that purpose. def greeting() yield end greeting {puts "Hello there!"}