Sha256: 5ba4f48a07b7a8fd1d3db3e7eec65dddca9f2bc3375631efb704069850277596
Contents?: true
Size: 558 Bytes
Versions: 20
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true require "pathname" require "rfix/git_helper" class Rfix::GitFile include Rfix::GitHelper attr_reader :path, :ref def initialize(path, ref, root_dir) @path = File.join(root_dir, path) @root_dir = Pathname.new(root_dir) @ref = ref @ranges = [] end def file? File.file?(path) end def ==(other) path == other.path end def eql?(other) path == other.path end def hash path.hash end def relative_path Pathname.new(path).relative_path_from(@root_dir).to_s end end
Version data entries
20 entries across 20 versions & 1 rubygems