Welcome back to Metaprogramming with Ruby! In part one we looked at what Metaprogramming is and how it works; we explored deep into the internals of Ruby’s method lookup system and walked through how creating Singleton Classes fits into that mechanism. Now for the good part: applying it all. Mocking objects for testing Some of the most useful features of Ruby’s metaprogramming have been shown off countless times in the vast array of testing frameworks available.

Read the article:
RubySource: Ruby Metaprogramming: Part II

I’m Nathan Kleyn, and I am a web developer hailing from the heart of London, UK. I currently work for UK based web-startup Intent HQ, and spend my days spreading the Ruby and Haskell love. I also work with JavaScript, C, Bash, IO, HTML, and CSS.

Get your free chapter of Level Up Your Web Apps with Go

Get a free chapter of Level Up Your Web Apps with Go, plus updates and exclusive offers from SitePoint.

No Reader comments

Related books & courses
Available now on SitePoint Premium

Preview for $1