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-1.13.1 lib/git/path.rb
git-1.13.0 lib/git/path.rb
lg_pod_plugin-1.0.8 lib/git/path.rb
lg_pod_plugin-1.0.7 lib/git/path.rb
lg_pod_plugin-1.0.6 lib/git/path.rb
git-1.12.0 lib/git/path.rb
git-1.11.0 lib/git/path.rb
git-1.10.2 lib/git/path.rb
git-1.10.1 lib/git/path.rb
git-1.10.0 lib/git/path.rb
git-1.9.1 lib/git/path.rb
git-1.9.0 lib/git/path.rb
p-mongo-git-1.8.1 lib/git/path.rb
git-1.8.1 lib/git/path.rb
git-1.8.0 lib/git/path.rb
git-glimmer-1.7.0 lib/git/path.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/git-1.7.0/lib/git/path.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/git-1.7.0/lib/git/path.rb
git-1.7.0 lib/git/path.rb
git-1.6.0 lib/git/path.rb