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
11
12
13
14
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 11
def create
::FileUtils.mkdir_p(path)
self
end
|
#delete ⇒ self
17
18
19
20
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 17
def delete
::FileUtils.rm_rf(path)
self
end
|
24
25
26
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 24
def directory(*subpath)
git.directory(*self.subpath, *subpath)
end
|
30
31
32
|
# File 'lib/eac_git/rspec/stubbed_git_local_repo/directory.rb', line 30
def file(*subpath)
git.file(*self.subpath, *subpath)
end
|