Method: OpenSSL::Buffering#puts

Defined in:
lib/openssl/buffering.rb

#puts(*args) ⇒ Object

Writes args to the stream along with a record separator.

See IO#puts for full details.



432
433
434
435
436
437
438
439
440
441
442
443
# File 'lib/openssl/buffering.rb', line 432

def puts(*args)
  s = Buffer.new
  if args.empty?
    s << "\n"
  end
  args.each{|arg|
    s << arg.to_s
    s.sub!(/(?<!\n)\z/, "\n")
  }
  do_write(s)
  nil
end