On Apr 7, 2:05 pm, Jed <[email protected]> wrote:
> Thanks, these examples on modules and mixins will get me started. I
> dont expect to understand everything, that for me comes through use,
> if ever, ha, ha.
>
> Another question, related, is that you mentioned interfaces, which are
> obviously the preferred way to implement code in java style languages
> - as opposed to extending them. is there such a practice in ruby or do
> you' require' an existing class and add functionality to it in your
> new class (my read on 'extending' a class in ruby)?
You may use various ways to add functionalities to a class:
- modules with include or import
- inner classes
- adding some methods to an already existing class or to a specific
object via eigenclass
- child/parent classes
- structures
- modifying an existing class, up to inhibiting all functions in it
and write your own ones
- aliasing method
- missing method
etc, etc.
not to mention that nobody impedes you to call another language from
ruby.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to