Module: Dapp::Dimg::Dimg::Path
- Included in:
- Dapp::Dimg::Dimg
- Defined in:
- lib/dapp/dimg/dimg/path.rb
Instance Method Summary collapse
- #build_path(*path) ⇒ Object (also: #build_dir)
- #container_dapp_path(*path) ⇒ Object
- #container_tmp_path(*path) ⇒ Object
- #home_path(*path) ⇒ Object
- #tmp_dir_exists? ⇒ Boolean
- #tmp_path(*path) ⇒ Object (also: #tmp_dir)
Instance Method Details
#build_path(*path) ⇒ Object Also known as: build_dir
18 19 20 |
# File 'lib/dapp/dimg/dimg/path.rb', line 18 def build_path(*path) dapp.build_path(*path)..tap { |p| p.parent.mkpath } end |
#container_dapp_path(*path) ⇒ Object
22 23 24 |
# File 'lib/dapp/dimg/dimg/path.rb', line 22 def container_dapp_path(*path) make_path('/.dapp', *path) end |
#container_tmp_path(*path) ⇒ Object
26 27 28 |
# File 'lib/dapp/dimg/dimg/path.rb', line 26 def container_tmp_path(*path) container_dapp_path('tmp', *path) end |
#home_path(*path) ⇒ Object
5 6 7 |
# File 'lib/dapp/dimg/dimg/path.rb', line 5 def home_path(*path) dapp.path(*path). end |
#tmp_dir_exists? ⇒ Boolean
9 10 11 |
# File 'lib/dapp/dimg/dimg/path.rb', line 9 def tmp_dir_exists? @tmp_path != nil end |
#tmp_path(*path) ⇒ Object Also known as: tmp_dir
13 14 15 16 |
# File 'lib/dapp/dimg/dimg/path.rb', line 13 def tmp_path(*path) @tmp_path ||= Dir.mktmpdir('dapp-', dapp.tmp_base_dir) make_path(@tmp_path, *path)..tap { |p| p.parent.mkpath } end |