RES: Bare-bones Ruby

Discussion in 'Ruby' started by Leiradella, Andre V Matos Da Cunha, Dec 28, 2004.

  1. > Ruby does not support multiple inheritance but provides a very neat
    > way to reuse code: modules. Declaring a module and including it
    > automatically makes all the methods available in your classes.


    I actually need something similar to Java interfaces, so for example if
    someone wants to make his/her object "previewable" inside Moray's preview
    windows he/she will have to implement the interface Previewable, and by
    doing that he/she will have to implement the method preview that will be
    called to construct the object's wire frame.

    Multiple inheritance will work for me too, I can raise an exception in
    method preview of class Previewable telling the user that this method must
    be overridden, but I'd prefer to use interfaces.

    I'm also looking at Pike and Ferite, the later have something called
    protocol which is, as far as I can tell, exactly the same as Java
    interfaces. I'll let you guys know when I make my choice .

    Thank you for the info.

    Andre de Leiradella
     
    Leiradella, Andre V Matos Da Cunha, Dec 28, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leiradella, Andre V Matos Da Cunha

    Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 27, 2004, in forum: Ruby
    Replies:
    5
    Views:
    146
    Robert Klemme
    Dec 28, 2004
  2. Leiradella, Andre V Matos Da Cunha

    RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 28, 2004, in forum: Ruby
    Replies:
    0
    Views:
    113
    Leiradella, Andre V Matos Da Cunha
    Dec 28, 2004
  3. Leiradella, Andre V Matos Da Cunha

    RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 28, 2004, in forum: Ruby
    Replies:
    1
    Views:
    86
    rcoder
    Dec 28, 2004
  4. Leiradella, Andre V Matos Da Cunha

    RES: RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 29, 2004, in forum: Ruby
    Replies:
    1
    Views:
    302
    Stefan Schmiedl
    Dec 29, 2004
  5. Leiradella, Andre V Matos Da Cunha

    RES: RES: RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 29, 2004, in forum: Ruby
    Replies:
    0
    Views:
    135
    Leiradella, Andre V Matos Da Cunha
    Dec 29, 2004
Loading...

Share This Page