class DockerToolkit::ChildProcess::Windows::IO

Private Instance Methods

check_type(io) click to toggle source
# File lib/docker_toolkit/childprocess/windows/io.rb, line 7
def check_type(io)
  return if has_fileno?(io)
  return if has_to_io?(io)

  raise ArgumentError, "#{io.inspect}:#{io.class} must have :fileno or :to_io"
end
has_fileno?(io) click to toggle source
# File lib/docker_toolkit/childprocess/windows/io.rb, line 14
def has_fileno?(io)
  io.respond_to?(:fileno) && io.fileno
end
has_to_io?(io) click to toggle source
# File lib/docker_toolkit/childprocess/windows/io.rb, line 18
def has_to_io?(io)
  io.respond_to?(:to_io) && io.to_io.kind_of?(::IO)
end