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-dev-0.12.1dev-java plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-dev-0.12.0dev-java plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.11 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.11.0dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.10 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.9.2 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.9.1 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.9.0 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.8.1 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.8 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.7 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.6.1 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.6 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.6.1dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.1 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5 plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.6dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.5dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.4dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb
redcar-0.5.3dev plugins/scm_git/vendor/ruby-git/lib/git/path.rb