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 |
Please explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?
What are differences between ruby and python?
Explain about methods?
What are the ruby variables?
Tell me an array [1,2,34,5,6,7,8,9], product it using a method?
Can method names be capitalized?
Explain the three levels of access control for ruby methods?
what is the purpose of the rakefile available in the demo directory in ruby?
Tell me what is the role of sub-directory app/controllers and app/helpers?
Explain the types of variables available in ruby class?
What is ruby class?
Tell us what is the difference between dynamic and static scaffolding?