Modules and Classes, Includes and Extends

Discussion in 'Ruby' started by Alpha Blue, Jan 30, 2010.

  1. Alpha Blue

    Alpha Blue Guest

    I wanted to provide an example which for me is easier to understand than
    always using the Foo + Bar examples others use. When using modules and
    classes, I see them as containers. I decided to just put together a
    more far-fetched example using the Earth, Gravity, Oxygen, and an
    AlienSpecies.

    http://gist.github.com/290785

    I don't normally nest modules and classes deeply, so I'm just trying to
    wrap my head around the idea of including and extending modules and
    classes.

    I believe that I'm correct with the very last example, or am I not?

    If you want to add some more examples to this, please do.
    --
    Posted via http://www.ruby-forum.com/.
    Alpha Blue, Jan 30, 2010
    #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. Ian Stanley

    extends multiple classes?

    Ian Stanley, Aug 9, 2003, in forum: Java
    Replies:
    13
    Views:
    155,517
    htmlrulezd00d
    Mar 13, 2012
  2. Michael Schwarz
    Replies:
    0
    Views:
    130
    Michael Schwarz
    Oct 2, 2013
  3. Gisle Vanem
    Replies:
    0
    Views:
    128
    Gisle Vanem
    Oct 2, 2013
  4. Stefan Behnel
    Replies:
    0
    Views:
    120
    Stefan Behnel
    Oct 2, 2013
  5. Oscar Benjamin
    Replies:
    0
    Views:
    102
    Oscar Benjamin
    Oct 3, 2013
Loading...

Share This Page