Posts tagged: arguments

3 posts

Better Know A Ruby Thing #5: Block Arguments

Previously in what what I guess is now “The Argument Trilogy”, we talked about: * [Positional Arguments](https://noelrappin.com/blog/2024/01/better-know-positional-arguments/) * [Keyword Arguments](https://noelrappin.com/blog/2024/02/better-know-keyword-arguments/) And now the trilogy now comes to its inevitable conclusion with ~~“Return of The Jedi”~~ block arguments. In the interest of keeping this thing within the plausible word count of...

Better Know A Ruby Thing #4: Keyword Arguments

Last time on Better Know A Ruby Thing, we covered positional arguments, and now we’re going to move on to keyword arguments. I really did think this was going to be shorter than the last one, and then I got to the conversion between keyword and positional arguments, and then......

Better Know A Ruby Thing #3: Positional Arguments

Ruby has three ways to pass information from a method call to a method definition: positional arguments, keyword arguments, and block arguments. Each of these ways has: * A syntax to declare an argument of that type in a method definition * A syntax to declare an argument of that...
All Posts

Subscribe to the Dynamic Rubyist Newsletter

Subscribe to the blog via RSS

RSS Feed