Blocks in Ruby are often used but can be a bit elusive, especially when starting out. In this screencast, I walk through some basic block usage, talk through the syntax, and walk through coding three detailed examples that make use of blocks.
Chapters
00:00 - Intro
00:47 - Basic Usage
10:00 - Example: Building a Custom Map Method
23:48 - Example: Setting Config Through a Block
40:32 - Example: API Response Builder
1:06:05 - Outro
Support my screencasts by buying me a coffee: https://www.buymeacoffee.com/brettcha...
View the source code from the episode: https://github.com/brettchalupa/scree...
Additional resources that helped me out:
https://engineering.gusto.com/ruby-bl...
https://mixandgo.com/learn/ruby-blocks
https://www.bigbinary.com/blog/unders...