Class: Appril::CLI::Docker::Install
- Inherits:
-
Object
- Object
- Appril::CLI::Docker::Install
- Includes:
- Helpers
- Defined in:
- lib/appril-cli/docker/install.rb
Instance Method Summary collapse
-
#initialize(dir, working_dir_opted: false) ⇒ Install
constructor
A new instance of Install.
- #install(dir, working_dir_opted) ⇒ Object
Methods included from Helpers
#create_dirname_for, #display_error, #expanded_path, #extract_namespace, #fatal_error!, #make_executable, #working_dir_opted?
Constructor Details
#initialize(dir, working_dir_opted: false) ⇒ Install
Returns a new instance of Install.
8 9 10 11 12 |
# File 'lib/appril-cli/docker/install.rb', line 8 def initialize dir, working_dir_opted: false install(dir, working_dir_opted) make_executable(dir / PREPARE_BUILD_FILE) puts "Done. All files installed into #{dir}" end |
Instance Method Details
#install(dir, working_dir_opted) ⇒ Object
14 15 16 17 |
# File 'lib/appril-cli/docker/install.rb', line 14 def install dir, working_dir_opted src = working_dir_opted ? DOCKER_DIR.to_path + '/skel/.' : DOCKER_DIR / 'skel' FileUtils.cp_r(src, dir) end |