Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is yield statement in ruby.



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

Post New Answer

More Ruby Interview Questions

Please explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


What are differences between ruby and python?

1 Answers  


Explain about methods?

1 Answers  


What are the ruby variables?

1 Answers  


Tell me an array [1,2,34,5,6,7,8,9], product it using a method?

1 Answers  


Can method names be capitalized?

1 Answers  


Explain the three levels of access control for ruby methods?

1 Answers  


what is the purpose of the rakefile available in the demo directory in ruby?

1 Answers  


Tell me what is the role of sub-directory app/controllers and app/helpers?

1 Answers  


Explain the types of variables available in ruby class?

1 Answers  


What is ruby class?

1 Answers  


Tell us what is the difference between dynamic and static scaffolding?

1 Answers  


Categories