Self and Protected Methods question/confusion

I'm still trying to learn the in's and out's of Ruby and Rails. I've
been testing my code a million different ways and have read a number of
books and web sites, but something is still not clicking for me. I want
to be able to call the protected methods

Ruby's object system is a message passing system. If you have an
object foo, and you do:


foo doesn't perform a method call on itself. foo just looks for
somewhere to send the "some_method" message, somewhere that returns
true for respond_to?


In knowing how this works, you can send the message yourself, ignoring
the private or protected nature of the receiver along the way.

Here's an example:

#!/usr/bin/env ruby

class Foo
  def hidden
    puts "I am hidden"

f =

  puts "Can't run hidden: #{ $! }"

f.send( :hidden )


Can't run hidden: private method `hidden' called for #<Foo:0xb7c2f92c>
I am hidden