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...


In how many ways a block is written in Ruby?



In how many ways a block is written in Ruby?..

Answer / Kirti Singh

A Ruby block can be defined in two main ways: 1) using curly braces ({}), and 2) by indenting the code under a method or loop. However, it's important to note that a block is not executed on its own but is passed as an argument to the method or loop that calls it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

what is the difference between a gem and a plugin in Ruby?

1 Answers  


How to access Ruby strings elements in an application?

1 Answers  


Tell me how you can create a controller for subject?

1 Answers  


How to create ruby object?

1 Answers  


What does ruby name refers to?

1 Answers  


What are ruby blocks.

1 Answers  


Explain some differences between ruby and python.

1 Answers  


Can you list out the few features of ruby?

1 Answers  


Explain about environment variables present in ruby?

1 Answers  


In how many ways items can be removed from array in Ruby?

1 Answers  


What is the difference between ruby 1.9 and ruby 2.0?

1 Answers  


Is ruby whitespace-dependent?

1 Answers  


Categories