Saturday, May 17, 2014

March #TMIL - Ruby class macros

My how the time flies. Still, I'd rather be late than abandon my New Year's resolution early! Here are some notes that have been sitting in this draft for the last two months.

Two quick tips

  • PC Keyboard Hack is a must-have extension for me. I find it's much nicer on your hands to avoid using the Return key on the right side of the keyboard. (You can make some remappings in the Keyboard->Modifier Keys panel in the OS X system preferences; however, Return is not an available choice for remapping Caps Lock.) 
  • Enable control-R backsearch in irb by adding this code to your ~/.editrc file :
    • bind "^R" em-inc-search-prev
    • Source

Class macros in Ruby