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

Interview Question on Ruby on Rails

Inserting and Moving elements inside Ruby Array