Articles by Ariel Juodziukynas

Exploring Method Arguments in Ruby: Part 3

In the first and second parts of this series we talked about positional and keyword arguments, but we still have some extra options so that our methods can do anything we want.

In this final part we are going to explore blocks, array decomposition, partially applied methods and a few syntax tricks. We'll also study a few known methods to understand how everything is used in real world applications.

Read more »

Exploring Method Arguments in Ruby: Part 1

Ruby is an object oriented language where everything is an object (even methods are objects of the class Method!), so everything we need to do is done by calling methods on objects. That also means that methods have to provide a lot of flexibility because they are used everywhere.

Ruby provides a lot of options to pass arguments to our methods, so we'll make this topic a series so it's not too long. We'll split the options into different categories and then break down everything with some examples and/or use cases.

Read more »