Sha256: c250a40bf6b655e390fd46f2d248fde055932230a018eef8d2792b6ef5541b46

Contents?: true

Size: 454 Bytes

Versions: 118

Compression:

Stored size: 454 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

118 entries across 91 versions & 16 rubygems

Version Path
birkirb-git-1.1.1 lib/git/path.rb
birkirb-git-1.1.2 lib/git/path.rb
iownbey-git-1.0.7.1 lib/git/path.rb
peterwald-git-1.1.2 lib/git/path.rb
peterwald-git-1.1.3 lib/git/path.rb
peterwald-git-1.1.4 lib/git/path.rb
schacon-git-1.0.6 lib/git/path.rb
schacon-git-1.0.7 lib/git/path.rb
schacon-git-1.1.1 lib/git/path.rb
schacon-git-1.2.0 lib/git/path.rb
schacon-git-1.2.1 lib/git/path.rb
schacon-git-1.2.2 lib/git/path.rb
technicalpickles-git-1.1.1 lib/git/path.rb
titanous-git-1.1.0 lib/git/path.rb
devise_sociable-0.1.0 vendor/bundle/gems/git-1.2.5/lib/git/path.rb
ruby-git-lacravate-0.0.2 lib/git/path.rb
ruby-git-lacravate-0.0.1 lib/git/path.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/path.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/path.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/path.rb