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


How to read a file in Ruby?



How to read a file in Ruby?..

Answer / Munesh Singh

To read a file in Ruby, you can use the File.read method. For example: File.read('filename.txt').

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Is ruby a statically typed or a dynamically typed language?

1 Answers  


what is a class library in Ruby?

1 Answers  


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

1 Answers  


Explain redo statement in Ruby?

1 Answers  


How to read a file in Ruby?

1 Answers  


Explain Ruby module?

1 Answers  


Can you please explain what is the difference between string and symbol?

1 Answers  


Tell me how you define instance variable, global variable and class variable in ruby?

1 Answers  


What are the three levels of method access control for classes and what do they signify? What do they imply about the method?

1 Answers  


What is the use of global variable $ in Ruby?

1 Answers  


Please explain what is mvc and why do we use it?

1 Answers  


Explain ampersand parameter (&block) in Ruby?

1 Answers  


Categories