Ruby’s Block • Passing a block as argument • Method “yield” or “call” the block • May passing a object as argument • Result from the block goes back to the method
Duck Punching (Monkey patch) • Objects and class are open • Add method to object even at Runtime! • Not really recommend, less maintainability, might break some stuff • But it’s awesome
Testing ... • Ensure everything still works after you make change to something else • Save you ass from client’s call at 3AM • Test driven development • Write test – watch it fails – write just enough code to make it pass – refactor