Java translation into Ruby

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
<>—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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs