
Programming Ruby Marek Hulán, Marek Jelen, Ivan Nečas Version 0.2, September 25, 2017 Table of Contents Ruby basics. 1 1. Instalation . 2 1.1. Linux . 2 1.2. Windows. 2 1.3. macOS . 2 2. Running Ruby . 3 2.1. Interactive Ruby . 3 3. About Ruby . 4 3.1. Interpreted. 4 3.2. Universal . 4 3.3. Fully Object oriented . 4 3.4. Everything is an expression. 4 3.5. Atomic memory management. 4 3.6. MRI. 4 3.7. Strongly typed . 4 3.8. Dynamically typed . 4 3.9. What is written in Ruby? . 5 4. Conventions. 6 5. Basic syntax. 7 5.1. Operator priority . 7 5.2. Special characters in method names. 7 5.3. Comments . 7 6. Data types . 9 6.1. Strings . 9 6.2. Numbers . 9 6.3. Empty value. 9 6.4. Booleans . 9 6.5. Arrays . 10 6.6. Hashes. 10 6.7. Symbols . 10 7. Objects and methods. 11 8. Variables . 12 9. Conditions . 13 10. Logical operators . 15 11. Regular expressions . 16 12. Loops . 17 13. Methods . 18 14. Reusing code from other files. 19 15. Blocks . 20 16. Objects . 22 17. Inheritance . 23 18. Class methods and attributes . 24 19. Modules . 25 20. Method access. 26 21. Duck typing . 27 22. Exceptions . 28 Advanced Ruby . 29 23. Return values . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages63 Page
-
File Size-