Sublime
An inspiration engine for ideas
This chapter will introduce you to a Ruby construct that’s closely related to classes: modules. As their name suggests, modules encourage modular design: program design that breaks large components into smaller ones and lets you mix and match object behaviors.
Joe Leo • The Well-Grounded Rubyist
Classes are important in Ruby; they’re a way to bundle and label behaviors (you can have a Person class, a Task class, and so on) and to create multiple objects with similar behaviors easily. But—and in this respect, Ruby differs from some other object-oriented languages—the real action is with the individual objects: every object has the potential
... See moreJoe Leo • The Well-Grounded Rubyist
You use do and end to specify a block of code. In this case, you’re sending that block to the each method, saying, “This is what I want you to do with each of the objects in the array.”
Chris Pine • Learn to Program

(Using p rather than print or puts results in the array being printed out in array notation. Otherwise, each array element would appear on a separate line, making it harder to see that an array is involved at all.)
Joe Leo • The Well-Grounded Rubyist
Prototype code is meant only to create a prototype. It is not meant to handle many users, nor be easily understood by those who didn’t write it. Industrial code, by contrast, is meant to be easily debugged as well as handle many users.
Alex MacCaw • The Great CEO Within: The Tactical Guide to Company Building
Any instance method available to a bare instance of Object is available to every object; that is, if you can do obj = Object.new obj.some_method then you can call some_method on an object instance.
Joe Leo • The Well-Grounded Rubyist
The syntax &: is an abbreviated way of iterating over each of the elements in the tickets array and selecting the largest number. &: is often used with the map method, iterating over each element in an array, hash, or range and applying a method: >> ["havoc", "prodigy"].map(&:capitalize) => ["Havoc"
... See moreJoe Leo • The Well-Grounded Rubyist
The first, conditional execution (if and its variants), is a fundamental and straightforward programming tool in almost any programming language. Looping is a more specialized but closely related technique, and Ruby provides you with several ways to do it. When we get to iteration, we’ll be in true Ruby hallmark territory. The technique isn’t uniqu
... See more