i = 0
@doc.traverse_text { |text|
puts "#{i}: " + text.to_s.strip + “\n”
i += 1
}
def hit_enter_to_continue
gets s
chomp
if( $_ == “x”)
break
end
end
i = 0
@doc.traverse_text { |text|
puts "#{i}: " + text.to_s.strip + “\n”
i += 1
}
def hit_enter_to_continue
gets s
chomp
if( $_ == “x”)
break
end
end
On Jul 15, 2007, at 07:40 , David Lam wrote:
def hit_enter_to_continue
gets s
chomp
if( $_ == “x”)
break
end
end
Try using getch.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs