Sha256: d2514d36aaa3d305a0d6ba703d616c42ae6fa7364ed593bafacfc69c88797e46

Contents?: true

Size: 573 Bytes

Versions: 15

Compression:

Stored size: 573 Bytes

Contents

# coding: utf-8

require "stringio"
require "tempfile"

#
# On tests, we try to simulate input output with
# StringIO, Tempfile and File objects.
#
# For this to be accomplished, we have to do some
# tweaking so that they respond adequately to the
# called methods during tests.
#

module IOConsoleCompatible
  def getch(min:nil, time:nil, intr: nil)
    getc
  end

  attr_accessor :echo

  def winsize
    [24, 80]
  end
end

class Tempfile
  include IOConsoleCompatible
end

class File
  include IOConsoleCompatible
end

class StringIO
  include IOConsoleCompatible
end

Version data entries

15 entries across 14 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/highline-3.1.1/lib/highline/io_console_compatible.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/highline-3.1.1/lib/highline/io_console_compatible.rb
highline-3.1.2 lib/highline/io_console_compatible.rb
brakeman-7.0.0 bundle/ruby/3.1.0/gems/highline-3.1.1/lib/highline/io_console_compatible.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/highline-3.1.1/lib/highline/io_console_compatible.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/highline-3.1.1/lib/highline/io_console_compatible.rb
highline-3.1.1 lib/highline/io_console_compatible.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/highline-3.1.0/lib/highline/io_console_compatible.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/highline-3.1.0/lib/highline/io_console_compatible.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/highline-3.0.1/lib/highline/io_console_compatible.rb
highline-3.1.0 lib/highline/io_console_compatible.rb
brakeman-6.1.2 bundle/ruby/3.3.0/gems/highline-3.0.1/lib/highline/io_console_compatible.rb
highline-3.0.1 lib/highline/io_console_compatible.rb
highline-3.0.0 lib/highline/io_console_compatible.rb
highline-3.0.0.pre.1 lib/highline/io_console_compatible.rb