Monthly archive: March 10, 2014

Overriding the Private Method of a Ruby Class

It feels like forever since I ever posted anything, but, here I am with an interesting post on ruby! Consider the following class which has a private method called “say”. class Client def print say end private def say “hello” end end c = puts c.print Let’s assume you are unit testing the Client [...]