Sha256: efb4b7f4478c4d0315277ef5f64b2ed37296b5a4d651ab593151dfa6d6e7cd61
Contents?: true
Size: 493 Bytes
Versions: 10
Compression:
Stored size: 493 Bytes
Contents
require "pathname" module Rubycritic class Location attr_reader :pathname, :line def initialize(path, line) @pathname = Pathname.new(path) @line = line.to_i end def file_name @pathname.basename.sub_ext("").to_s end def to_s "#{pathname}:#{line}" end def ==(other) state == other.state end def <=>(other) state <=> other.state end protected def state [@pathname, @line] end end end
Version data entries
10 entries across 10 versions & 1 rubygems