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
cvss-suite-1.0.1 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/path.rb
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/path.rb
git-1.3.0 lib/git/path.rb
git-1.2.9.1 lib/git/path.rb
git-1.2.9 lib/git/path.rb
clc-git-1.2.8 lib/git/path.rb
git-1.2.8 lib/git/path.rb