Class: Dapp::Config::Artifact::Base
- Inherits:
-
Object
- Object
- Dapp::Config::Artifact::Base
- Defined in:
- lib/dapp/config/artifact.rb
Overview
Base
Direct Known Subclasses
Instance Attribute Summary collapse
-
#_cwd ⇒ Object
Returns the value of attribute _cwd.
-
#_group ⇒ Object
Returns the value of attribute _group.
-
#_owner ⇒ Object
Returns the value of attribute _owner.
-
#_paths ⇒ Object
Returns the value of attribute _paths.
-
#_where_to_add ⇒ Object
Returns the value of attribute _where_to_add.
Instance Method Summary collapse
- #_artifact_options ⇒ Object
- #clone ⇒ Object
-
#initialize(where_to_add, **options) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(where_to_add, **options) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 17 |
# File 'lib/dapp/config/artifact.rb', line 9 def initialize(where_to_add, **) @_cwd = '' @_where_to_add = where_to_add .each do |k, v| respond_to?("_#{k}=") ? send(:"_#{k}=", v) : raise(Error::Config, code: code, data: { type: object_name, attr: k }) end end |
Instance Attribute Details
#_cwd ⇒ Object
Returns the value of attribute _cwd.
7 8 9 |
# File 'lib/dapp/config/artifact.rb', line 7 def _cwd @_cwd end |
#_group ⇒ Object
Returns the value of attribute _group.
7 8 9 |
# File 'lib/dapp/config/artifact.rb', line 7 def _group @_group end |
#_owner ⇒ Object
Returns the value of attribute _owner.
7 8 9 |
# File 'lib/dapp/config/artifact.rb', line 7 def _owner @_owner end |
#_paths ⇒ Object
Returns the value of attribute _paths.
7 8 9 |
# File 'lib/dapp/config/artifact.rb', line 7 def _paths @_paths end |
#_where_to_add ⇒ Object
Returns the value of attribute _where_to_add.
7 8 9 |
# File 'lib/dapp/config/artifact.rb', line 7 def _where_to_add @_where_to_add end |
Instance Method Details
#_artifact_options ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/dapp/config/artifact.rb', line 23 def { where_to_add: _where_to_add, cwd: _cwd, paths: _paths, owner: _owner, group: _group } end |
#clone ⇒ Object
33 34 35 |
# File 'lib/dapp/config/artifact.rb', line 33 def clone Marshal.load(Marshal.dump(self)) end |