Sha256: e19e1724781358dd886a1fa6e4253ea278d4e0952323ca1f1e71e47fec0fc8cb
Contents?: true
Size: 567 Bytes
Versions: 2010
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true module RSpec module Support class Source # @private # Represents a source location of node or token. Location = Struct.new(:line, :column) do include Comparable def self.location?(array) array.is_a?(Array) && array.size == 2 && array.all? { |e| e.is_a?(Integer) } end def <=>(other) line_comparison = (line <=> other.line) return line_comparison unless line_comparison == 0 column <=> other.column end end end end end
Version data entries
2,010 entries across 2,010 versions & 15 rubygems