From b5d6b907b080992c2d0220eceb66f4ffa85207cd Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Wed, 7 Nov 2007 16:24:15 -0800 Subject: got the first round working --- lib/git/path.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/git/path.rb (limited to 'lib/git/path.rb') diff --git a/lib/git/path.rb b/lib/git/path.rb new file mode 100644 index 0000000..9d6ba49 --- /dev/null +++ b/lib/git/path.rb @@ -0,0 +1,23 @@ +module Git + class Path + + attr_accessor :path + + def initialize(path) + if File.exists?(path) + @path = path + else + raise ArgumentError, "path does not exist", path + end + end + + def readable? + File.readable?(@path) + end + + def writable? + File.writable?(@path) + end + + end +end \ No newline at end of file -- cgit