/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

jakeyesbeck.com
| | thomascountz.com

Adding Functionality to Client Classes The first step in tackling this problem is to add functionality to a model class. If we have a class Book, we want to add a class method Book.find , and some instance methods book#title, book#author, and book#isbn, without needed to explicitly write them, like we did in the original spike. A Note on Mix-Ins & Inheritance When you want to create a model with ActiveRecord, you have to inherit from the Base module: class Book < ActiveRecord::Base; end There are endless debates about composition v. inheritance, and, from my perspective, they all mostly lean towards composition, but what about using mix-ins versus using string inheritance? In Ruby, inheriting and including a module both add a new entity in the method look-up...
6.2 parsecs

Travel
| |
| | www.schneems.com

This document is all about deciphering behavior of Ruby code using nothing but Ruby code. I recommend you get familiar with a debugger like pry-debugger, thi...
2.4 parsecs

Travel
| |
| | viewsourcecode.org

[AI summary] A technical blog post from May 16, 2005, explains Ruby metaclasses, singleton classes, and metaprogramming techniques including meta_eval, class_def, and meta_def.
7.3 parsecs

Travel
| |
| | yehudakatz.com

When showing off cool features of Ruby to the uninitiated (or to a language sparring partner [http://stackoverflow.com/questions/1099305/why-is-ruby-more-suitable-for-rails-than-python/1099367] ), the excited Rubyist often shows off Ruby's "powerful block syntax". Unfortunately, the Rubyist uses "powerful block syntax" as shorthand for a number of features that the Pythonista
53.4 parsecs

Travel
|