Class: Dapp::Config::Directive::Artifact::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dapp/config/directive/artifact.rb

Overview

Base

Direct Known Subclasses

Stage, GitArtifact::Local

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(where_to_add, **options) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
18
# File 'lib/dapp/config/directive/artifact.rb', line 10

def initialize(where_to_add, **options)
  @_cwd          = ''
  @_where_to_add = where_to_add

  options.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

#_cwdObject

Returns the value of attribute _cwd.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _cwd
  @_cwd
end

#_exclude_pathsObject

Returns the value of attribute _exclude_paths.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _exclude_paths
  @_exclude_paths
end

#_groupObject

Returns the value of attribute _group.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _group
  @_group
end

#_ownerObject

Returns the value of attribute _owner.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _owner
  @_owner
end

#_pathsObject

Returns the value of attribute _paths.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _paths
  @_paths
end

#_where_to_addObject

Returns the value of attribute _where_to_add.



8
9
10
# File 'lib/dapp/config/directive/artifact.rb', line 8

def _where_to_add
  @_where_to_add
end

Instance Method Details

#_artifact_optionsObject



28
29
30
31
32
33
34
35
36
37
# File 'lib/dapp/config/directive/artifact.rb', line 28

def _artifact_options
  {
    where_to_add:  _where_to_add,
    cwd:           _cwd,
    paths:         _paths,
    exclude_paths: _exclude_paths,
    owner:         _owner,
    group:         _group
  }
end