Eloquent Ruby - book notes
Language Basics
Ch 01 - Syntax
- Very Basics
- Comments
- Camels & Snakes
- Parentheses
- Line Folding
- Code Blocks
Ch 03 - Smart Collections
- Literal shortcuts
- Instant arrays & hashes from Method calls
- Iterating through a collection
- Bang (!) methods
- Hash ordering
Ch 05 - Regexes
- Matching one character at a time
- Sets, ranges & alternatives
- The Star ("*") operator
- Regexes in Ruby
- Beginnings & endings
Ch 06 - Symbols
- Symbols vs Strings
- Not Quite a String
- Optimized to "stand for something"
Ch 07 - Everything is an Object
- Classes, instances & methods - a quick review
- Objects: all the way down
- Key object attributes
- Public, private & protected methods
Classes, Modules, Blocks
Ch 10 - Classes
- Compressing specifications
- Composing Methods for Humans
- Composing Ruby Methods
- Single Exit Methods
Ch 11 - Operators
- Defining Ruby Operators
- Examples
- Operating across Classes
- Broadening the Definition of "=="
- Well-Behaved Equality
- Triple Equals ("===") for Case Statements
- Hash Tables and eql?
- Well-Behaved Hash Keys
Ch 15 - Modules & Name Spaces
- A Place for your Stuff
- A Home for Utility Methods
- Building Modules
- Treat Modules as Objects (Because they are)
Ch 17 - Blocks & Iteration
- Review of Code Blocks
- One Words after Another
- As Many Iterators as You Like
- Other Iterator Tools
- Enumerable: Your Iterator on Steroids
Ch 19 - Delayed Execution
- Explicit Blocks
- The Callback Problem
- Banking Blocks
- Saving Blocks for Lazy Initialization
- Instant Block Objects
Metaprogramming
Ch 20 - Hooks
- Waking up to a New Subclass
- Modules Want to be Heard
- Knowing When your Time is Up
- ...And a Cast of Thousands
Ch 26 - Classes that Modify Subclasses
- A document of Paragraphs
- Subclassing
- Class Methods that Build Instance Methods
- Better Method Creation: define_method
- Modifications: the Sky is the Limit
Putting it Together
Ch 27 - Internal DSLs
- Little Languages for Big Problems
- XML
- Stepping over the DSL Line
- Pulling out the Stops
Ch 28 - External DSLs
- The Trouble with the Ripper
- Internal is not the only DSL
- Regex for Heavier Parsing
- Treetops
-
Ch 29 - Packaging Gems
- Consuming Gems
- Gem Versions
- Nuts & Bolts
- Building a Gem
- Uploading Your Gem to a Repo
- Automating Gem Creation