yield method automatically detects any passed code block and passes control to it : yield Method Ruby January 4, 2020 def each_vowel %w{a e i o u}.each { |vowel| yield vowel } end each_vowel { |vowel| puts vowel } Post navigationx, y = 1, 2 # Same as x = 1; y = 2 : Variables Language Basics Rubyyield with proc parameter : yield Method Ruby Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *CommentName * Email * Website