class ChildProcess::Windows::IO
Private Instance Methods
check_type(io)
click to toggle source
# File lib/childprocess/windows/io.rb, line 6 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/childprocess/windows/io.rb, line 13 def has_fileno?(io) io.respond_to?(:fileno) && io.fileno end
has_to_io?(io)
click to toggle source
# File lib/childprocess/windows/io.rb, line 17 def has_to_io?(io) io.respond_to?(:to_io) && io.to_io.kind_of?(::IO) end