Class: Dapp::Config::GitArtifact
- Inherits:
-
Object
- Object
- Dapp::Config::GitArtifact
- Defined in:
- lib/dapp/config/git_artifact.rb
Overview
GitArtifact
Defined Under Namespace
Instance Attribute Summary collapse
-
#_local ⇒ Object
readonly
Returns the value of attribute _local.
-
#_remote ⇒ Object
readonly
Returns the value of attribute _remote.
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize ⇒ GitArtifact
constructor
A new instance of GitArtifact.
- #local(*args) ⇒ Object
- #remote(*args) ⇒ Object
Constructor Details
#initialize ⇒ GitArtifact
Returns a new instance of GitArtifact.
8 9 10 11 |
# File 'lib/dapp/config/git_artifact.rb', line 8 def initialize @_local = [] @_remote = [] end |
Instance Attribute Details
#_local ⇒ Object (readonly)
Returns the value of attribute _local.
5 6 7 |
# File 'lib/dapp/config/git_artifact.rb', line 5 def _local @_local end |
#_remote ⇒ Object (readonly)
Returns the value of attribute _remote.
6 7 8 |
# File 'lib/dapp/config/git_artifact.rb', line 6 def _remote @_remote end |
Instance Method Details
#clone ⇒ Object
21 22 23 |
# File 'lib/dapp/config/git_artifact.rb', line 21 def clone Marshal.load(Marshal.dump(self)) end |
#local(*args) ⇒ Object
13 14 15 |
# File 'lib/dapp/config/git_artifact.rb', line 13 def local(*args) @_local.tap { |local| local << Local.new(*args) unless args.empty? } end |
#remote(*args) ⇒ Object
17 18 19 |
# File 'lib/dapp/config/git_artifact.rb', line 17 def remote(*args) @_remote.tap { |remote| remote << Remote.new(*args) unless args.empty? } end |