Blocks and yields in Ruby

I am trying to understand blocks and yield and how they work in Ruby.

How is yield used? Many of the Rails applications I’ve looked at use yield in a weird way.

Can someone explain to me or show me …

Chef libraries or definitions?

Being relatively new to Chef, I am required to create libraries or definitions from existing recipes.

There recipes use bash resource, ruby block resource (which notifies another ruby block resource …