Hello. I have a small problem with Ruby. I am newbie in rubby and i need
to write something who works like this.


if keypressed = somekey
   do something

i tried to do it using Curses but getch function is waiting everytime
for
key and i don't want that. I want program to work independently from key
pressing unless the right key is pressed. Any tips for me?


def sitemonitor()
    Curses.noecho
    Curses.init_screen
    while true
      puts Curses.getch()
      for i in @listofSite
        if i.updatecheck()
          printf("some msg")
        end
      end
    end
end

-- 
Posted via http://www.ruby-forum.com/.