Method: Pwnlib::Tubes::Tube#puts
- Defined in:
- lib/pwnlib/tubes/tube.rb
#puts(*objs) ⇒ Integer
Sends the given object(s). The difference with IO#puts is using context.newline as default newline.
343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/pwnlib/tubes/tube.rb', line 343 def puts(*objs) return write(context.newline) if objs.empty? objs = *objs.flatten s = +'' objs.map(&:to_s).each do |elem| s << elem s << context.newline unless elem.end_with?(context.newline) end write(s) end |