News for hackers. Stuff that matters.
Re:Ruby Access Control - Are Private And Protected Methods O... by epochwolf on Monday April 05, 2010 @10:38AM (#1241985)
tl;dr -> Ruby allows you to bypass private/protected by using Object#send

    class Object
      private 
      def name
        puts "Name called"
      end
    end

    o = Object.new
    o = o.send :name # outputs "Name called"
And therefore you can easily test private methods.

There are no comments on this comment yet.