Ruby Programming Language Question: Download Ruby PDF

Explain about ruby code blocks?

Tweet Share WhatsApp

Answer:

Ruby code blocks form an important part of ruby and are very fun to use. With the help of this feature you can place your code between do-end and you can associate them with method invocations and you can get an impression that they are like parameters. They may appear near to a source of the code and adjacent to a method call. The code is not executed during the program execution but it is executed when the context of its appearance is met or when it enters a method.

Download Ruby PDF Read All 26 Ruby Questions
Previous QuestionNext Question
Explain about interpolation?Explain the difference between nil and false in ruby?