Module: Dapp::Config::Dimg::InstanceMethods
- Included in:
- Dapp::Config::Dimg, Dapp::Config::DimgGroup
- Defined in:
- lib/dapp/config/dimg/instance_methods.rb
Overview
InstanceMethods
Defined Under Namespace
Classes: GitArtifact
Instance Attribute Summary collapse
-
#_artifact ⇒ Object
readonly
Returns the value of attribute _artifact.
-
#_builder ⇒ Object
readonly
Returns the value of attribute _builder.
-
#_chef ⇒ Object
readonly
Returns the value of attribute _chef.
-
#_docker ⇒ Object
readonly
Returns the value of attribute _docker.
-
#_git_artifact ⇒ Object
readonly
Returns the value of attribute _git_artifact.
-
#_install_dependencies ⇒ Object
readonly
Returns the value of attribute _install_dependencies.
-
#_mount ⇒ Object
readonly
Returns the value of attribute _mount.
-
#_setup_dependencies ⇒ Object
readonly
Returns the value of attribute _setup_dependencies.
-
#_shell ⇒ Object
readonly
Returns the value of attribute _shell.
Instance Method Summary collapse
- #_dev_mode ⇒ Object
- #_import_artifact ⇒ Object
- #artifact(&blk) ⇒ Object
- #chef(&blk) ⇒ Object
- #dev_mode ⇒ Object
- #docker(&blk) ⇒ Object
- #git(url = nil, &blk) ⇒ Object
- #install_depends_on(*args) ⇒ Object
- #mount(to, &blk) ⇒ Object
- #setup_depends_on(*args) ⇒ Object
- #shell(&blk) ⇒ Object
Instance Attribute Details
#_artifact ⇒ Object (readonly)
Returns the value of attribute _artifact.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _artifact @_artifact end |
#_builder ⇒ Object (readonly)
Returns the value of attribute _builder.
6 7 8 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 6 def _builder @_builder end |
#_chef ⇒ Object (readonly)
Returns the value of attribute _chef.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _chef @_chef end |
#_docker ⇒ Object (readonly)
Returns the value of attribute _docker.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _docker @_docker end |
#_git_artifact ⇒ Object (readonly)
Returns the value of attribute _git_artifact.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _git_artifact @_git_artifact end |
#_install_dependencies ⇒ Object (readonly)
Returns the value of attribute _install_dependencies.
8 9 10 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 8 def _install_dependencies @_install_dependencies end |
#_mount ⇒ Object (readonly)
Returns the value of attribute _mount.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _mount @_mount end |
#_setup_dependencies ⇒ Object (readonly)
Returns the value of attribute _setup_dependencies.
8 9 10 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 8 def _setup_dependencies @_setup_dependencies end |
#_shell ⇒ Object (readonly)
Returns the value of attribute _shell.
7 8 9 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 7 def _shell @_shell end |
Instance Method Details
#_dev_mode ⇒ Object
53 54 55 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 53 def _dev_mode !!@_dev_mode end |
#_import_artifact ⇒ Object
109 110 111 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 109 def _import_artifact _artifact.select(&:not_associated?) end |
#artifact(&blk) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 36 def artifact(&blk) _artifact.concat begin pass_to_custom(ArtifactGroup.new(project: project), :clone_to_artifact).tap do |artifact_group| artifact_group.instance_eval(&blk) if block_given? end._export end end |
#chef(&blk) ⇒ Object
22 23 24 25 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 22 def chef(&blk) builder(:chef) directive_eval(_chef, &blk) end |
#dev_mode ⇒ Object
10 11 12 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 10 def dev_mode @_dev_mode = true end |
#docker(&blk) ⇒ Object
32 33 34 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 32 def docker(&blk) directive_eval(_docker, &blk) end |
#git(url = nil, &blk) ⇒ Object
44 45 46 47 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 44 def git(url = nil, &blk) type = url.nil? ? :local : :remote _git_artifact.send(type, url.to_s, &blk) end |
#install_depends_on(*args) ⇒ Object
14 15 16 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 14 def install_depends_on(*args) _install_dependencies.concat(args) end |
#mount(to, &blk) ⇒ Object
49 50 51 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 49 def mount(to, &blk) _mount << Directive::Mount.new(to, project: project, &blk) end |
#setup_depends_on(*args) ⇒ Object
18 19 20 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 18 def setup_depends_on(*args) _setup_dependencies.concat(args) end |
#shell(&blk) ⇒ Object
27 28 29 30 |
# File 'lib/dapp/config/dimg/instance_methods.rb', line 27 def shell(&blk) builder(:shell) directive_eval(_shell, &blk) end |