Sha256: 09a5b12b827a2d15bc43abae3b7a38e20a86e07c3379751e24a09e914051aa31

Contents?: true

Size: 456 Bytes

Versions: 67

Compression:

Stored size: 456 Bytes

Contents

module Git
 
 class Path
    
    attr_accessor :path
    
    def initialize(path, check_path=true)
      path = File.expand_path(path)
      
      if check_path && !File.exist?(path)
        raise ArgumentError, 'path does not exist', [path]
      end
      
      @path = path
    end
    
    def readable?
      File.readable?(@path)
    end

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

end

Version data entries

67 entries across 67 versions & 13 rubygems

Version Path
git-2.3.3 lib/git/path.rb
git-2.3.2 lib/git/path.rb
git-2.3.1 lib/git/path.rb
git-2.3.0 lib/git/path.rb
git-2.2.0 lib/git/path.rb
git-2.1.1 lib/git/path.rb
git-2.1.0 lib/git/path.rb
git-2.0.0.pre3 lib/git/path.rb
git-2.0.0.pre2 lib/git/path.rb
git-2.0.0.pre1 lib/git/path.rb
git-1.19.1 lib/git/path.rb
git-1.19.0 lib/git/path.rb
git-1.18.0 lib/git/path.rb
git-1.17.2 lib/git/path.rb
git-1.17.1 lib/git/path.rb
git-1.17.0 lib/git/path.rb
git-1.16.0 lib/git/path.rb
git-1.15.0 lib/git/path.rb
git-1.14.0 lib/git/path.rb
git-1.13.2 lib/git/path.rb