Sha256: f4e2a0a0b72f2760353890ddd2dcfe850bf073594f72e3913d4f85dd441f0d61
Contents?: true
Size: 459 Bytes
Versions: 15
Compression:
Stored size: 459 Bytes
Contents
# -*- encoding: utf-8 -*- # Benchmark speed of shell operations $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'tty' require 'benchmark' require 'benchmark/ips' require 'stringio' input = ::StringIO.new output = ::StringIO.new shell = TTY::Shell.new(input, output) Benchmark.ips do |r| r.report("Ruby #puts") do output.puts "What is your name?" end r.report("TTY #ask") do shell.ask("What is your name?") end end
Version data entries
15 entries across 15 versions & 1 rubygems