class YARP::Location
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp.rbs class YARP::Location def end_line: () -> Integer def end_offset: () -> Integer def initialize: (YARP::Source source, Integer start_offset, Integer length) -> void def slice: () -> String def start_column: () -> Integer def start_line: () -> Integer end
This represents a location in the source.
def self.null
def self.null new(0, 0) end
def ==(other)
def ==(other) other.is_a?(Location) && other.start_offset == start_offset && other.end_offset == end_offset end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { start_offset: start_offset, end_offset: end_offset } end
def end_column
The column number in bytes where this location ends from the start of the
def end_column source.column(end_offset - 1) end
def end_line
Experimental RBS support (using type sampling data from the type_fusion
project).
def end_line: () -> Integer
This signature was generated using 3 samples from 1 application.
def end_line source.line(end_offset - 1) end
def end_offset
Experimental RBS support (using type sampling data from the type_fusion
project).
def end_offset: () -> Integer
This signature was generated using 2 samples from 1 application.
def end_offset start_offset + length end
def initialize(source, start_offset, length)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (YARP::Source source, Integer start_offset, Integer length) -> void
This signature was generated using 3930 samples from 1 application.
def initialize(source, start_offset, length) @source = source @start_offset = start_offset @length = length end
def inspect
def inspect "#<YARP::Location @start_offset=#{@start_offset} @length=#{@length}>" end
def pretty_print(q)
def pretty_print(q) q.text("(#{start_offset}...#{end_offset})") end
def slice
Experimental RBS support (using type sampling data from the type_fusion
project).
def slice: () -> String
This signature was generated using 357 samples from 1 application.
def slice source.slice(start_offset, length) end
def start_column
Experimental RBS support (using type sampling data from the type_fusion
project).
def start_column: () -> Integer
This signature was generated using 1 sample from 1 application.
The column number in bytes where this location starts from the start of
def start_column source.column(start_offset) end
def start_line
Experimental RBS support (using type sampling data from the type_fusion
project).
def start_line: () -> Integer
This signature was generated using 285 samples from 1 application.
def start_line source.line(start_offset) end