Class: Dapp::Dimg::Config::Directive::GitArtifactRemote::Export

Inherits:
Dapp::Dimg::Config::Directive::GitArtifactLocal::Export show all
Defined in:
lib/dapp/dimg/config/directive/git_artifact_remote.rb

Instance Attribute Summary collapse

Attributes inherited from ArtifactBase::Export

#_cwd, #_exclude_paths, #_group, #_include_paths, #_owner, #_to

Instance Method Summary collapse

Methods inherited from Dapp::Dimg::Config::Directive::GitArtifactLocal::Export

#stage_dependencies

Methods inherited from ArtifactBase::Export

#exclude_paths, #group, #include_paths, #initialize, #owner, #to

Methods inherited from Base

#clone_to_artifact

Methods inherited from Config::Directive::Base

#clone, #initialize

Constructor Details

This class inherits a constructor from Dapp::Dimg::Config::Directive::ArtifactBase::Export

Instance Attribute Details

#_branchObject

Returns the value of attribute _branch.



36
37
38
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 36

def _branch
  @_branch
end

#_commitObject

Returns the value of attribute _commit.



36
37
38
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 36

def _commit
  @_commit
end

#_nameObject

Returns the value of attribute _name.



36
37
38
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 36

def _name
  @_name
end

#_urlObject

Returns the value of attribute _url.



36
37
38
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 36

def _url
  @_url
end

Instance Method Details

#_artifact_optionsObject



38
39
40
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 38

def _artifact_options
  super.merge(name: _name, branch: _branch, commit: _commit)
end

#branch(value) ⇒ Object



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def branch(value)
  sub_directive_eval { @_branch = value }
end

#commit(value) ⇒ Object



46
47
48
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 46

def commit(value)
  sub_directive_eval { @_commit = value }
end

#validate!Object

Raises:



50
51
52
53
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 50

def validate!
  super
  raise Error::Config, code: :git_artifact_remote_branch_with_commit if !_branch.nil? && !_commit.nil?
end