EdUarDo said:
>> If Button is a like a Java interface (i.e. no behavior), then you don't
>> need one in Ruby.  Just implement BigButton and LittleButton with
>> compatible methods.
>
> Well I'm trying to get rid of my way of thinking in Java and C++. I have
> modeled a class that has objects of LittleButton and BigButton.
> In Java I'd have:
>
> class Window {
>   private Button little = new LittleButton();
>   private Button big = new BigButton();
> }

Ruby:

  class Window
    def initialize
      @little = LittleButton.new
      @big = BigButton.new
    end
  end

> I know that in Ruby I won't declare attributes like that but it's hard to
> me to have a code that dosen't seems to my model.

Hmmm ... I'm not sure I understand the last half of that sentence.

> What do you mean with compatible methods?

If you want to be able to use either Big or Little buttons in the same
piece of code, then both buttons need to respond to a common set of
methods.  The methods in this common set should be named the same in both
classes, take the same number of arguments and have similar semantics.

-- 
-- Jim Weirich     jim / weirichhouse.org    http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)