Explain about ruby code blocks?
Answer / Priyanshu Kaushik
Ruby code blocks are defined by curly braces {} and they can be used to group multiple lines of code that need to execute together. Code blocks can also contain method definitions, control structures, and iterations. They are often used with methods that accept a block as an argument.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of interpolation in ruby?
How is visibility of methods changed in ruby?
How to create a new time instance in Ruby?
Tell me what is the difference between active support's “hashwithindifferent” and ruby's “hash” ?
Difference between render and redirect?
Is ruby a statically typed or a dynamically typed language?
Tell me how you can create a controller for subject?
Explain about Float, Dig and Max?
Explain while loop in ruby.
what is a class library in Ruby?
In how many ways items can be added in an array in Ruby?
How would you implement hash in ruby internally?