Class Git::Path
In: lib/git/path.rb
Parent: Object

Methods

new   readable?   to_s   writable?  

Attributes

path  [RW] 

Public Class methods

[Source]

# File lib/git/path.rb, line 6
    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

Public Instance methods

[Source]

# File lib/git/path.rb, line 14
    def readable?
      File.readable?(@path)
    end

[Source]

# File lib/git/path.rb, line 22
    def to_s
      @path
    end

[Source]

# File lib/git/path.rb, line 18
    def writable?
      File.writable?(@path)
    end

[Validate]