Module: Dapp::Application::Path

Included in:
Dapp::Application
Defined in:
lib/dapp/application/path.rb

Overview

Path

Instance Method Summary collapse

Instance Method Details

#build_path(*path) ⇒ Object



15
16
17
# File 'lib/dapp/application/path.rb', line 15

def build_path(*path)
  make_path(project.build_path.join(config._basename), *path).expand_path.tap { |p| p.parent.mkpath }
end

#container_dapp_path(*path) ⇒ Object



19
20
21
# File 'lib/dapp/application/path.rb', line 19

def container_dapp_path(*path)
  make_path('/.dapp', *path)
end

#container_tmp_path(*path) ⇒ Object



23
24
25
# File 'lib/dapp/application/path.rb', line 23

def container_tmp_path(*path)
  container_dapp_path('tmp', *path)
end

#home_path(*path) ⇒ Object



6
7
8
# File 'lib/dapp/application/path.rb', line 6

def home_path(*path)
  make_path(config._home_path, *path).expand_path
end

#tmp_path(*path) ⇒ Object



10
11
12
13
# File 'lib/dapp/application/path.rb', line 10

def tmp_path(*path)
  @tmp_path ||= Dir.mktmpdir(project.cli_options[:tmp_dir_prefix] || 'dapp-')
  make_path(@tmp_path, *path).expand_path.tap { |p| p.parent.mkpath }
end