Sha256: 331e0cd27cbf5f6714d6e0d56c120de104bc8c7901ce1d95734e7570c911526c

Contents?: true

Size: 457 Bytes

Versions: 24

Compression:

Stored size: 457 Bytes

Contents

module Git
  class Path
    
    attr_accessor :path
    
    def initialize(path, check_path = true)
      if !check_path || File.exists?(path)
        @path = File.expand_path(path)
      else
        raise ArgumentError, "path does not exist: " + File.expand_path(path)
      end
    end
    
    def readable?
      File.readable?(@path)
    end

    def writable?
      File.writable?(@path)
    end
    
    def to_s
      @path
    end
    
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
redcar-0.5.2dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.1dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.4.1 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.4 plugins/scm_git/vendor/ruby-git/lib/git/path.rb