Class: Dapp::Dimg::Config::Directive::GitArtifactRemote
- Inherits:
-
GitArtifactLocal
- Object
- Config::Directive::Base
- Base
- ArtifactBase
- GitArtifactLocal
- Dapp::Dimg::Config::Directive::GitArtifactRemote
- 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 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 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.
8 9 10 11 12 13 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 8 def initialize(url, **kwargs, &blk) @_url = url @_name = url.gsub(%r{.*?([^\/ ]+\/[^\/ ]+)\.git}, '\\1') super(**kwargs, &blk) end |
Instance Attribute Details
#_branch ⇒ Object (readonly)
Returns the value of attribute _branch.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 6 def _branch @_branch end |
#_commit ⇒ Object (readonly)
Returns the value of attribute _commit.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 6 def _commit @_commit end |
#_name ⇒ Object (readonly)
Returns the value of attribute _name.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 6 def _name @_name end |
#_url ⇒ Object (readonly)
Returns the value of attribute _url.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 6 def _url @_url end |
Instance Method Details
#_export ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 23 def _export super do |export| export._url = @_url export._name = @_name export._branch ||= @_branch export._commit ||= @_commit end end |
#branch(value) ⇒ Object
15 16 17 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 15 def branch(value) sub_directive_eval { @_branch = value.to_s } end |
#commit(value) ⇒ Object
19 20 21 |
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 19 def commit(value) sub_directive_eval { @_commit = value } end |