Class: Dapp::Dimg::Config::Directive::GitArtifactRemote
- Inherits:
-
GitArtifactLocal
- Object
- Config::Directive::Base
- Base
- ArtifactBase
- GitArtifactLocal
- Dapp::Dimg::Config::Directive::GitArtifactRemote
- Includes:
- Helper::Url
- Defined in:
- lib/dapp/dimg/config/directive/git_artifact_remote.rb
Defined Under Namespace
Classes: Export
Instance Attribute Summary collapse
-
#_branch ⇒ Object
readonly
Returns the value of attribute _branch.
-
#_commit ⇒ Object
readonly
Returns the value of attribute _commit.
-
#_name ⇒ Object
readonly
Returns the value of attribute _name.
-
#_url ⇒ Object
readonly
Returns the value of attribute _url.
Attributes inherited from GitArtifactLocal
Attributes inherited from ArtifactBase
Instance Method Summary collapse
- #_export ⇒ Object
- #branch(value) ⇒ Object
- #commit(value) ⇒ Object
-
#initialize(url, **kwargs, &blk) ⇒ GitArtifactRemote
constructor
A new instance of GitArtifactRemote.
Methods included from Helper::Url
#get_host_from_git_url, #git_url_to_name
Methods inherited from GitArtifactLocal
Methods inherited from ArtifactBase
Methods inherited from Base
Methods inherited from Config::Directive::Base
Constructor Details
#initialize(url, **kwargs, &blk) ⇒ GitArtifactRemote
Returns a new instance of GitArtifactRemote.
10 11 12 13 14 15 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 10 def initialize(url, **kwargs, &blk) @_url = url @_name = git_url_to_name(url) super(**kwargs, &blk) end |
Instance Attribute Details
#_branch ⇒ Object (readonly)
Returns the value of attribute _branch.
8 9 10 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 8 def _branch @_branch end |
#_commit ⇒ Object (readonly)
Returns the value of attribute _commit.
8 9 10 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 8 def _commit @_commit end |
#_name ⇒ Object (readonly)
Returns the value of attribute _name.
8 9 10 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 8 def _name @_name end |
#_url ⇒ Object (readonly)
Returns the value of attribute _url.
8 9 10 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 8 def _url @_url end |
Instance Method Details
#_export ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 25 def _export super do |export| export._url = @_url export._name = @_name export._branch ||= @_branch export._commit ||= @_commit yield(export) if block_given? end end |
#branch(value) ⇒ Object
17 18 19 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 17 def branch(value) sub_directive_eval { @_branch = value.to_s } end |
#commit(value) ⇒ Object
21 22 23 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 21 def commit(value) sub_directive_eval { @_commit = value.to_s } end |