Sha256: c017c7828175ea6b6bc0d798a4d79214aa9f354ee3f73790a416552eba974444

Contents?: true

Size: 257 Bytes

Versions: 2

Compression:

Stored size: 257 Bytes

Contents

# frozen_string_literal: true

require_relative '../lib/tty-command'

cli = File.expand_path('cli', __dir__)
cmd = TTY::Command.new

stdin = StringIO.new
stdin.puts "hello"
stdin.puts "world"
stdin.rewind

out, _ = cmd.run(cli, :in => stdin)

puts "#{out}"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tty-command-0.9.0 examples/redirect_stdin.rb
tty-command-0.8.2 examples/redirect_stdin.rb