class YARP::Location
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp.rbs class YARP::Location def initialize: (YARP::Source source, Integer start_offset, Integer length) -> void def slice: () -> untyped def start_line: () -> untyped 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
def end_line source.line(end_offset - 1) end
def end_offset
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 867 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: () -> untyped
This signature was generated using 47 samples from 1 application.
def slice source.slice(start_offset, length) end
def start_column
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: () -> untyped
This signature was generated using 47 samples from 1 application.
def start_line source.line(start_offset) end