Method: Textbringer::Buffer#to_s

Defined in:
lib/textbringer/buffer.rb

#to_sObject



453
454
455
456
457
458
459
460
# File 'lib/textbringer/buffer.rb', line 453

def to_s
  result = @contents.byteslice(0...@gap_start) +
    @contents.byteslice(@gap_end..-1)
  if !@binary
    result.force_encoding(Encoding::UTF_8)
  end
  result
end