Sha256: f1497e8f02223683c2a9efaedf0e4ab08e2a2fdc8b74955e1108ce2bb86f5684

Contents?: true

Size: 1.18 KB

Versions: 25

Compression:

Stored size: 1.18 KB

Contents

module RBS
  # Location is the range on buffer, `start_pos..end_pos`.
  # The index is based on characters.
  class Location
    # The buffer this location points on.
    attr_reader buffer: Buffer

    # The index of character the range starts from.
    attr_reader start_pos: Integer

    # The index of character the range ends at.
    attr_reader end_pos: Integer

    def initialize: (buffer: Buffer, start_pos: Integer, end_pos: Integer) -> void

    def inspect: () -> ::String

    def name: () -> untyped

    def start_line: () -> Integer

    def start_column: () -> Integer

    def end_line: () -> Integer

    def end_column: () -> Integer

    def start_loc: () -> Buffer::loc

    def end_loc: () -> Buffer::loc

    def source: () -> String

    def to_s: () -> String

    def self.to_string: (Location? location, ?default: ::String default) -> String

    def ==: (untyped other) -> bool

    def +: (Location other) -> Location

    def pred?: (Location loc) -> bool

    def to_json: (*untyped args) -> untyped

    # `<<` locations given as argument.
    def concat: (*Location?) -> Location

    # Append given location destructively.
    def <<: (Location?) -> Location
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rbs-1.1.1 sig/location.rbs
rbs-1.1.0 sig/location.rbs
rbs-1.0.6 sig/location.rbs
rbs-1.0.5 sig/location.rbs
rbs-1.0.4 sig/location.rbs
rbs-1.0.3 sig/location.rbs
rbs-1.0.2 sig/location.rbs
rbs-1.0.1 sig/location.rbs
rbs-1.0.0 sig/location.rbs
rbs-1.0.0.pre2 sig/location.rbs
rbs-1.0.0.pre sig/location.rbs
rbs-0.20.1 sig/location.rbs
rbs-0.20.0 sig/location.rbs
rbs-0.19.0 sig/location.rbs
rbs-0.18.1 sig/location.rbs
rbs-0.18.0 sig/location.rbs
rbs-0.17.0 sig/location.rbs
rbs-0.16.0 sig/location.rbs
rbs-0.15.0 sig/location.rbs
rbs-0.14.0 sig/location.rbs