Add method that checks if path exists in StringPath

This commit is contained in:
Grzegorz Bizon
2016-01-14 12:48:15 +01:00
parent a5e1905d28
commit cd3b8bbd2f
3 changed files with 18 additions and 1 deletions
+4
View File
@@ -19,6 +19,10 @@ module Gitlab
@path
end
def exists?
@path == './' || @universe.include?(@path)
end
def absolute?
@path.start_with?('/')
end