On Oct 29, 2006, at 6:34 PM, Robert Conn wrote:

> Hi all,

Hello.

> This is my first submission to the list and I'm new to Ruby too.

Welcome!

> Comments and advice would really be appreciated.

My comment is that I wish I wrote Ruby that pretty when I was new.  :)

I'll give a couple super minor suggestions...

>   def initialize(*start_time)
>     @current_systime = Time.new
>     @actual = start_time[0] || Time.new
>     @last_displayed = @actual
>   end

Why take an Array of arguments but only use the first one?  I think  
you should drop the slurping operator:

def initialize(start_time)
   @current_systime = Time.new
   @actual = start_time || Time.new
   @last_displayed = @actual
end

>     # Decide whether to go forward or back 5 mins
>     if rand(2) == 1
>       @display = @actual + (5 * 60)
>     else
>       @display = @actual - (5 * 60)
>     end


You could shorten that up a bit, though I'm not sure this is as  
readable:

@display = @actual.send(%w[+ -][rand(2)], 5 * 60)

>     "#{"%02d" % @display.hour}:#{("%02d" % @display.min.to_s)[0..0]}~"

Perhaps the this is more straight forward:

@display.strftime("%H:%M").sub(/\d$/, "~")

Hope that gives you some new ideas.

James Edward Gray II