What is yield statement in ruby.
Answer / Pooja Gupta
"The yield statement in Ruby is used within a block (a piece of code defined between do...end). When encountered, it passes control to the block, allowing it to execute its code. The value (if any) returned by the block can then be captured and used within the method."
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain ruby data types.
How to use sql db or mysql db. Without defining it in the database.yml
Explain Ruby object?
What are the operators available in ruby?
Explain ruby class.
Explain the role of modules and mixins in ruby?
How does a symbol differ from a string?
What are some built-in ruby class exceptions.
Name different methods for io console in ruby?
what is Interpolation in Ruby?
Explain the three levels of access control for ruby methods?
what is the difference between a gem and a plugin in Ruby?