repo.or.cz
/
rubygit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
got the first round working
[rubygit.git]
/
lib
/
git
/
path.rb
blob
9d6ba49be28ab7152c1f5cc1f63f6a3907da08e6
1
module Git
2
class Path
3
4
attr_accessor :path
5
6
def initialize(path)
7
if File.exists?(path)
8
@path = path
9
else
10
raise ArgumentError, "path does not exist", path
11
end
12
end
13
14
def readable?
15
File.readable?(@path)
16
end
17
18
def writable?
19
File.writable?(@path)
20
end
21
22
end
23
end