Ruby Procs / Lambdas vs Methods for Variable Scope
There are some key differences between procs / lambdas and traditional methods in Ruby, however the differences can many times be subtle. In this exercise we'll examine how variable scope is processed differently between the different options. Follow me: Twitter: https://twitter.com/jordanhudgens Instagram: https://www.instagram.com/jordanhudgens/ GitHub: http://github.com/jordanhudgens Code: https://www.crondose.com/2017/03/demonstrate-ruby-procs-lambdas-vs-methods-variable-scope/
There are some key differences between procs / lambdas and traditional methods in Ruby, however the differences can many times be subtle. In this exercise we'll examine how variable scope is processed differently between the different options. Follow me: Twitter: https://twitter.com/jordanhudgens Instagram: https://www.instagram.com/jordanhudgens/ GitHub: http://github.com/jordanhudgens Code: https://www.crondose.com/2017/03/demonstrate-ruby-procs-lambdas-vs-methods-variable-scope/