Doing things in non ruby way

In Ruby, If we need to add two integers we can simply use
6 + 8
Another approach is using method invoking and passing arguments

We are using .(Dot which is also called period) to invoke +( Plus method ) and sending 8 as argument.

Similarly for Ruby Array


Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Difference between Validations, Callbacks and Observers