Class: EacGit::Rspec::StubbedGitLocalRepo::Directory
- Inherits:
-
FsObject
- Object
- FsObject
- EacGit::Rspec::StubbedGitLocalRepo::Directory
show all
- Defined in:
- lib/eac_git/rspec/stubbed_git_local_repo/directory.rb
Instance Attribute Summary
Attributes inherited from FsObject
#git, #subpath
Instance Method Summary
collapse
Methods inherited from FsObject
#initialize, #path
Instance Method Details
#create ⇒ self
10
11
12
13
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 10
def create
::FileUtils.mkdir_p(path)
self
end
|
#delete ⇒ self
16
17
18
19
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 16
def delete
::FileUtils.rm_rf(path)
self
end
|
23
24
25
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 23
def directory(*subpath)
git.directory(*self.subpath, *subpath)
end
|
29
30
31
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 29
def file(*subpath)
git.file(*self.subpath, *subpath)
end
|