Over 200 pages of free helpful information. Subjects covered include:
- Getting started with Ruby Language
- Casting (type conversion)
- Operators
- Variable Scope and Visibility
- Environment Variables
- Constants
- Special Constants in Ruby
- Comments
- Arrays
- Multidimensional Arrays
- Strings
- DateTime
- Time
- Numbers
- Symbols
- Comparable
- Control Flow
- Methods
- Hashes
- Blocks and Procs and Lambdas
- Iteration
- Exceptions
- Enumerators
- Enumerable in Ruby
- Classes
- Inheritance
- method_missing
- Regular Expressions and Regex Based Operations
- File and I/O Operations
- Ruby Access Modifiers
- Design Patterns and Idioms in Ruby
- Loading Source Files
- Thread
- Range
- Modules
- Introspection in Ruby
- Monkey Patching in Ruby
- Recursion in Ruby
- Splat operator (*)
- JSON with Ruby
- Pure RSpec JSON API testing
- Gem Creation/Management
- rbenv
- Gem Usage
- Singleton Class
- Queue
- Destructuring
- Struct
- Metaprogramming
- Dynamic Evaluation
- instance_eval
- Message Passing
- Keyword Arguments
- Truthiness
- Implicit Receivers and Understanding Self
- Introspection
- Refinements
- Catching Exceptions with Begin / Rescue
- Command Line Apps
- IRB
Ruby is a dynamic, interpreted, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.
According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp. It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.
Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. At a Google Tech Talk in 2008 Matsumoto further stated, "I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language." He stresses that systems design needs to emphasize human, rather than computer, needs:
"Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run fast. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves."
Ruby is said to follow the principle of least astonishment (POLA), meaning that the language should behave in such a way as to minimize confusion for experienced users. Matsumoto has said his primary design goal was to make a language that he himself enjoyed using, by minimizing programmer work and possible confusion. He has said that he had not applied the principle of least astonishment to the design of Ruby, but nevertheless the phrase has come to be closely associated with the Ruby programming language. The phrase has itself been a source of surprise, as novice users may take it to mean that Ruby's behaviors try to closely match behaviors familiar from other languages. In a May 2005 discussion on the newsgroup comp.lang.ruby, Matsumoto attempted to distance Ruby from POLA, explaining that because any design choice will be surprising to someone, he uses a personal standard in evaluating surprise. If that personal standard remains consistent, there would be few surprises for those familiar with the standard.
Source Wikipedia.