Class: Dapp::Config::Directive::Shell::Base

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

Overview

Base

Direct Known Subclasses

Artifact

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



10
11
12
13
14
15
# File 'lib/dapp/config/directive/shell/base.rb', line 10

def initialize
  @_before_install = []
  @_before_setup   = []
  @_install        = []
  @_setup          = []
end

Instance Attribute Details

#_before_installObject (readonly)

Returns the value of attribute _before_install.



7
8
9
# File 'lib/dapp/config/directive/shell/base.rb', line 7

def _before_install
  @_before_install
end

#_before_install_cache_versionObject (readonly)

Returns the value of attribute _before_install_cache_version.



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

def _before_install_cache_version
  @_before_install_cache_version
end

#_before_setupObject (readonly)

Returns the value of attribute _before_setup.



7
8
9
# File 'lib/dapp/config/directive/shell/base.rb', line 7

def _before_setup
  @_before_setup
end

#_before_setup_cache_versionObject (readonly)

Returns the value of attribute _before_setup_cache_version.



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

def _before_setup_cache_version
  @_before_setup_cache_version
end

#_installObject (readonly)

Returns the value of attribute _install.



7
8
9
# File 'lib/dapp/config/directive/shell/base.rb', line 7

def _install
  @_install
end

#_install_cache_versionObject (readonly)

Returns the value of attribute _install_cache_version.



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

def _install_cache_version
  @_install_cache_version
end

#_setupObject (readonly)

Returns the value of attribute _setup.



7
8
9
# File 'lib/dapp/config/directive/shell/base.rb', line 7

def _setup
  @_setup
end

#_setup_cache_versionObject (readonly)

Returns the value of attribute _setup_cache_version.



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

def _setup_cache_version
  @_setup_cache_version
end

Instance Method Details

#before_install(*args, cache_version: nil) ⇒ Object



17
18
19
20
# File 'lib/dapp/config/directive/shell/base.rb', line 17

def before_install(*args, cache_version: nil)
  @_before_install.concat(args)
  @_before_install_cache_version = cache_version
end

#before_setup(*args, cache_version: nil) ⇒ Object



22
23
24
25
# File 'lib/dapp/config/directive/shell/base.rb', line 22

def before_setup(*args, cache_version: nil)
  @_before_setup.concat(args)
  @_before_setup_cache_version = cache_version
end

#install(*args, cache_version: nil) ⇒ Object



27
28
29
30
# File 'lib/dapp/config/directive/shell/base.rb', line 27

def install(*args, cache_version: nil)
  @_install.concat(args)
  @_install_cache_version = cache_version
end

#reset_allObject



53
54
55
# File 'lib/dapp/config/directive/shell/base.rb', line 53

def reset_all
  methods.tap { |arr| arr.delete(__method__) }.grep(/^reset_/).each(&method(:send))
end

#reset_before_installObject



37
38
39
# File 'lib/dapp/config/directive/shell/base.rb', line 37

def reset_before_install
  @_before_install = []
end

#reset_before_setupObject



41
42
43
# File 'lib/dapp/config/directive/shell/base.rb', line 41

def reset_before_setup
  @_before_setup = []
end

#reset_installObject



45
46
47
# File 'lib/dapp/config/directive/shell/base.rb', line 45

def reset_install
  @_install = []
end

#reset_setupObject



49
50
51
# File 'lib/dapp/config/directive/shell/base.rb', line 49

def reset_setup
  @_setup = []
end

#setup(*args, cache_version: nil) ⇒ Object



32
33
34
35
# File 'lib/dapp/config/directive/shell/base.rb', line 32

def setup(*args, cache_version: nil)
  @_setup.concat(args)
  @_setup_cache_version = cache_version
end