adspace


How are blocks created?

Answer Posted / Gagandeep

Blocks in Ruby are defined by enclosing a piece of code between `do...end` or within an indented line that follows the method definition. When a method is called with such block, it can be captured using the `&block_variable` syntax.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current version of ruby on rails?

948