Ruby Study Notes: TOC
Core Ruby Programming
- Introduction
- Installation
- What is Ruby?
- Downloading Ruby and an Editor
- Ruby Programming Environment
- First Ruby Program
- Features
- Numbers in Ruby
- Operators and Precedence
- Difference between or and || operator
- Fun with Strings
- Variables and Assignment
- Summary 1
- Scope
- Global scope and global variables
- Built-in global variables
- Local scope
- Getting Input
- Names in Ruby
- More on Ruby Methods
- Writing own Ruby Methods
- Bang (!) methods
- Method names ending with ?
- Summary 2
- Ruby ri Tool
- More on Strings
- Listing all methods of a class or object
- Comparing two strings for equality
- Using %w
- Character Set
- Character Encoding
- Encoding class
- Simple Constructs
- Conditional ?:
- Statement modifiers
- Case Expressions
- nil is an Object
- Difference between FALSE and NIL
- Ruby Blocks
- Summary 3
- Ruby Arrays
- Parallel Assignment
- Environment Variables
- Command line arguments
- Library GetoptLong
- Ranges
- Ruby Symbols
- Hashes
- Using Symbols as Hash Keys
- Random Numbers
- Read/Write files
- Traversing Directory Trees
- Random Access
- Summary 4
- Regular Expressions
- Literal characters
- The wildcard character . (dot)
- Character classes
- Special escape sequences for common character classes
- Writing our own Class
- Literal Constructors
- Garbage Collection
- Class Methods
- Method Missing
- Ruby Procs
- Including Other Files
- Ruby Open Classes
- Inheritance
- Inheritance and Instance Variables
- Overriding Methods
- Usage of super
- Redefining methods
- Abstract Class
- Ruby Overloading Methods
- Summary 5
- Access Control
- Overriding private methods
- Top-level methods
- Are instance variables inherited by a sub-class?
- Exceptions
- Raising an Exception
- Handling an Exception
- Validation example
- Ruby Logging
- Ruby Time class
- Summary 6
- Duck Typing
- Ruby Syntactic Sugar
- Mutable and Immutable Objects
- Freezing Objects
- frozen?
- Summary 7
- Object Serialization
- Modules/Mixins
- Self
- Top level context
- Self inside class and module definitions
- Self in instance method definitions
- Self in singleton-method and class-method definitions
- Constants
- Summary 8
Note: The Ruby Logo is Copyright (c) 2006, Yukihiro Matsumoto. I have made extensive references to information, related to Ruby, available in the public domain (wikis and the blogs, articles of various Ruby Gurus), my acknowledgment and thanks to all of them. Much of the material on rubylearning.github.io and in the course at rubylearning.org is drawn primarily from the Programming Ruby book, available from The Pragmatic Bookshelf.