Class: Dapp::Config::Directive::Shell::Base
- Inherits:
-
Object
- Object
- Dapp::Config::Directive::Shell::Base
- Defined in:
- lib/dapp/config/directive/shell/base.rb
Overview
Base
Direct Known Subclasses
Instance Attribute Summary collapse
-
#_before_install ⇒ Object
readonly
Returns the value of attribute _before_install.
-
#_before_install_cache_version ⇒ Object
readonly
Returns the value of attribute _before_install_cache_version.
-
#_before_setup ⇒ Object
readonly
Returns the value of attribute _before_setup.
-
#_before_setup_cache_version ⇒ Object
readonly
Returns the value of attribute _before_setup_cache_version.
-
#_install ⇒ Object
readonly
Returns the value of attribute _install.
-
#_install_cache_version ⇒ Object
readonly
Returns the value of attribute _install_cache_version.
-
#_setup ⇒ Object
readonly
Returns the value of attribute _setup.
-
#_setup_cache_version ⇒ Object
readonly
Returns the value of attribute _setup_cache_version.
Instance Method Summary collapse
- #before_install(*args, cache_version: nil) ⇒ Object
- #before_setup(*args, cache_version: nil) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #install(*args, cache_version: nil) ⇒ Object
- #reset_all ⇒ Object
- #reset_before_install ⇒ Object
- #reset_before_setup ⇒ Object
- #reset_install ⇒ Object
- #reset_setup ⇒ Object
- #setup(*args, cache_version: nil) ⇒ Object
Constructor Details
#initialize ⇒ Base
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_install ⇒ Object (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_version ⇒ Object (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_setup ⇒ Object (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_version ⇒ Object (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 |
#_install ⇒ Object (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_version ⇒ Object (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 |
#_setup ⇒ Object (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_version ⇒ Object (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_all ⇒ Object
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_install ⇒ Object
37 38 39 |
# File 'lib/dapp/config/directive/shell/base.rb', line 37 def reset_before_install @_before_install = [] end |
#reset_before_setup ⇒ Object
41 42 43 |
# File 'lib/dapp/config/directive/shell/base.rb', line 41 def reset_before_setup @_before_setup = [] end |
#reset_install ⇒ Object
45 46 47 |
# File 'lib/dapp/config/directive/shell/base.rb', line 45 def reset_install @_install = [] end |
#reset_setup ⇒ Object
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 |