Forum: Ruby java translation into Ruby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1c7fdf191bd7eaec0ce1a54e3ffb7854?d=identicon&s=25 matt donaon (mmxico)
on 2007-04-28 17:21
hi friends ;
i have recenlty started Ruby;

I have a java source code and it has two interface ;

which are
+widget ,+observer
anologuetimer and digital timer implements both interface

i also have generator class
secondgenerator and minutegenerator are derived from that class

how could you design this structure in Ruby ?

observer{abstract class} ----------------------Generator <interface>
                                                  <>---second generator
                                                  <>---- minutegenerator


The way this program operates is thus. Generators are objects that
generate messages. These messages are then broadcast out into the world.
For example, the SecondGenerator will send out a message every second
while the MinuteGenerator will send out one every minute

thanks in advance guys

This topic is locked and can not be replied to.