In this chapter, we walked through the basic components that comprise the Ruby File class and also reviewed the list of options that you can use when creating or adding to files. We analyzed how you can read the contents of files into Ruby programs by utilizing the read method. We also examined how to iterate over each line in a file and perform operations on each line. We learned how to delete files in Ruby. However, you should be careful while using this command as you don't want to accidentally delete a file. Remember, Ruby offers no warning whatsoever before deleting, so make sure you use it carefully. This chapter also walked you through the commands for appending content to the end of a file. Appending content to the end of a file is a great way of adding persistence to a Ruby program, without having to integrate a full database such as PostgreSQL or MySQL....
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia