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… well, it’s not shorter. (I know I said the next newsletter was going to be Conway’s Law, that’s coming, but this one moved along faster…)
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 type in a method call A class that can can be used to convert arbitrary objects into and out of method calls A text marker that is associated with that kind of argument, *, **, or &.