Class: Dapp::Dimg::Config::Directive::ArtifactBase
- Inherits:
-
Base
- Object
- Config::Directive::Base
- Base
- Dapp::Dimg::Config::Directive::ArtifactBase
- Defined in:
- lib/dapp/dimg/config/directive/artifact_base.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Export
Instance Attribute Summary collapse
-
#_group ⇒ Object
readonly
Returns the value of attribute _group.
-
#_owner ⇒ Object
readonly
Returns the value of attribute _owner.
Instance Method Summary collapse
- #_export ⇒ Object
- #export(absolute_dir_path = nil, &blk) ⇒ Object
- #group(group) ⇒ Object
-
#initialize(**kwargs, &blk) ⇒ ArtifactBase
constructor
A new instance of ArtifactBase.
- #owner(owner) ⇒ Object
Methods inherited from Base
Methods inherited from Config::Directive::Base
Constructor Details
#initialize(**kwargs, &blk) ⇒ ArtifactBase
Returns a new instance of ArtifactBase.
8 9 10 11 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 8 def initialize(**kwargs, &blk) @_export = [] super(**kwargs, &blk) end |
Instance Attribute Details
#_group ⇒ Object (readonly)
Returns the value of attribute _group.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 6 def _group @_group end |
#_owner ⇒ Object (readonly)
Returns the value of attribute _owner.
6 7 8 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 6 def _owner @_owner end |
Instance Method Details
#_export ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 27 def _export @_export.each do |export| export._owner ||= @_owner export._group ||= @_group yield(export) if block_given? end end |
#export(absolute_dir_path = nil, &blk) ⇒ Object
21 22 23 24 25 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 21 def export(absolute_dir_path = nil, &blk) self.class.const_get('Export').new(absolute_dir_path, dapp: dapp, &blk).tap do |export| @_export << export end end |
#group(group) ⇒ Object
17 18 19 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 17 def group(group) sub_directive_eval { @_group = group } end |
#owner(owner) ⇒ Object
13 14 15 |
# File 'lib/dapp/dimg/config/directive/artifact_base.rb', line 13 def owner(owner) sub_directive_eval { @_owner = owner } end |