Object
# File rbs-2.1.0/lib/rbs/buffer.rb, line 8 def initialize(name,, content)) @name = name @content = content @lines = content.lines @ranges = [] offset = 0 lines.each do |line| size = line.size range = offset...(offset+size) ranges << range offset += size end end
# File rbs-2.1.0/lib/rbs/buffer.rb, line 50 def inspect "#<RBS::Buffer:#{__id__} @name=#{name}, @content=#{content.bytesize} bytes, @lines=#{lines.size} lines,>" end
# File rbs-2.1.0/lib/rbs/buffer.rb, line 46 def last_position content.size end