class TypeWriter

Public Class Methods

new(txt) click to toggle source
# File lib/typewriter.rb, line 4
def initialize(txt)
  typewriter do
    txt
  end
end

Public Instance Methods

typewriter() { || ... } click to toggle source
# File lib/typewriter.rb, line 10
def typewriter
  yield.each_char {|c| putc c; $stdout.flush; sleep 0.15}
end