Class: Dapp::Config::Main
- Inherits:
-
Application
- Object
- Application
- Dapp::Config::Main
- Defined in:
- lib/dapp/config/main.rb
Overview
Application
Instance Attribute Summary
Attributes inherited from Application
#config, #ignore_git_fetch, #project, #should_be_built
Instance Method Summary collapse
-
#initialize(dappfile_path:, project:) ⇒ Main
constructor
A new instance of Main.
- #name(value) ⇒ Object
Methods inherited from Application
#artifact?, #build!, #builder, #export!, #export_base!, #export_stages!, #import_base!, #import_stages!, #run, #scratch?, #stage_image_name
Methods included from Helper::Sha256
#hashsum, #paths_content_hashsum, #sha256
Methods included from Application::Stages
#images, #signature, #stage_cache_format, #stage_dapp_label
Methods included from Application::Path
#build_path, #container_dapp_path, #container_tmp_path, #home_path, #tmp_path
Methods included from Application::GitArtifact
#git_artifacts, #local_git_artifacts, #remote_git_artifacts
Constructor Details
#initialize(dappfile_path:, project:) ⇒ Main
Returns a new instance of Main.
5 6 7 8 9 10 11 12 |
# File 'lib/dapp/config/main.rb', line 5 def initialize(dappfile_path:, project:) @project = project @_home_path = Pathname.new(dappfile_path).parent..to_s @_basename = Pathname.new(@_home_path).basename.to_s @_builder = Pathname.new(@_home_path).join('Berksfile').exist? ? :chef : :shell super(nil) end |
Instance Method Details
#name(value) ⇒ Object
14 15 16 17 |
# File 'lib/dapp/config/main.rb', line 14 def name(value) project.log_warning(desc: { code: 'excess_name_instruction', context: 'warning' }) if @_basename == value.to_s @_basename = value end |