HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/rubies/default/lib/ruby/gems/3.0.0/gems/rbs-1.0.4/sig/buffer.rbs
module RBS
  class Buffer
    # Location in a buffer.
    # A pair of line number (1 origin) and column number (0 origin).
    #
    type loc = [Integer, Integer]

    # Name to identify Buffer.
    attr_reader name: untyped

    # The content of the buffer.
    attr_reader content: String

    attr_reader lines: Array[String]

    attr_reader ranges: Array[Range[Integer]]

    def initialize: (name: untyped name, content: String content) -> void

    # Translate position to location.
    def pos_to_loc: (Integer pos) -> loc

    # Translate location to position.
    def loc_to_pos: (loc loc) -> Integer

    def last_position: () -> Integer
  end
end