class Git::Path
Attributes
path[RW]
Public Class Methods
new(path, check_path = true)
click to toggle 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
readable?()
click to toggle source
# File lib/git/path.rb, line 14 def readable? File.readable?(@path) end
to_s()
click to toggle source
# File lib/git/path.rb, line 22 def to_s @path end
writable?()
click to toggle source
# File lib/git/path.rb, line 18 def writable? File.writable?(@path) end