Sha256: 77b45bf430050623bf2211d37d7a4b228085e06adc57bd4d2f59222f61e45bb0

Contents?: true

Size: 718 Bytes

Versions: 66

Compression:

Stored size: 718 Bytes

Contents

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

    @lines: Array[String]

    @ranges: Array[Range[Integer]]

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

    def lines: () -> Array[String]

    def ranges: () -> Array[Range[Integer]]

    # 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

Version data entries

66 entries across 66 versions & 2 rubygems

Version Path
rbs-3.4.2 sig/buffer.rbs
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/rbs-2.8.4/sig/buffer.rbs
rbs-3.4.1 sig/buffer.rbs
rbs-3.4.0 sig/buffer.rbs
rbs-3.4.0.pre.1 sig/buffer.rbs
rbs-3.3.2 sig/buffer.rbs
rbs-3.3.1 sig/buffer.rbs
rbs-3.3.0 sig/buffer.rbs
rbs-3.3.0.pre.2 sig/buffer.rbs
rbs-3.3.0.pre.1 sig/buffer.rbs
rbs-3.2.2 sig/buffer.rbs
rbs-3.2.1 sig/buffer.rbs
rbs-3.2.0 sig/buffer.rbs
rbs-3.2.0.pre.1 sig/buffer.rbs
rbs-3.1.3 sig/buffer.rbs
rbs-3.1.2 sig/buffer.rbs
rbs-3.1.1 sig/buffer.rbs
rbs-3.1.0 sig/buffer.rbs
rbs-3.0.4 sig/buffer.rbs
rbs-3.0.3 sig/buffer.rbs