Eustaquio Rangel de Oliveira Jr. <eustaquiorangel / yahoo.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi.
>
> When I do
> -
> ---------------------------------------------------------------------------
> class Foo ~   def bar
> ~      puts "bar!"
> ~   end
> end
> -
> ---------------------------------------------------------------------------
> and then -
> ---------------------------------------------------------------------------
> class Foo ~   def another_bar
> ~      puts "another bar!"
> ~   end
> end
> -
> ---------------------------------------------------------------------------
> am I adding another_bar method to the Foo class instance or on it's
> metaclass?

You're adding them to class Foo so instances of Foo can use them.  If you 
want them available as methods of Foo you have to do any of these:

class Foo
  def Foo.bar1() "bar1" end

  def self.bar2() "bar2" end

  class <<self
    def bar3() "bar3" end
  end

  class <<Foo
    def bar4() "bar4" end
  end
end

Kind regards

    robert