Class: Hocho::Drivers::Base
- Inherits:
-
Object
- Object
- Hocho::Drivers::Base
- Defined in:
- lib/hocho/drivers/base.rb
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
readonly
Returns the value of attribute base_dir.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#initializers ⇒ Object
readonly
Returns the value of attribute initializers.
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize(host, base_dir: '.', initializers: []) ⇒ Base
constructor
A new instance of Base.
- #run(dry_run: false) ⇒ Object
- #run_list ⇒ Object
Constructor Details
#initialize(host, base_dir: '.', initializers: []) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/hocho/drivers/base.rb', line 8 def initialize(host, base_dir: '.', initializers: []) @host = host @base_dir = base_dir @initializers = initializers end |
Instance Attribute Details
#base_dir ⇒ Object (readonly)
Returns the value of attribute base_dir.
14 15 16 |
# File 'lib/hocho/drivers/base.rb', line 14 def base_dir @base_dir end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
14 15 16 |
# File 'lib/hocho/drivers/base.rb', line 14 def host @host end |
#initializers ⇒ Object (readonly)
Returns the value of attribute initializers.
14 15 16 |
# File 'lib/hocho/drivers/base.rb', line 14 def initializers @initializers end |
Instance Method Details
#finalize ⇒ Object
20 21 |
# File 'lib/hocho/drivers/base.rb', line 20 def finalize end |
#run(dry_run: false) ⇒ Object
16 17 18 |
# File 'lib/hocho/drivers/base.rb', line 16 def run(dry_run: false) raise NotImplementedError end |
#run_list ⇒ Object
23 24 25 |
# File 'lib/hocho/drivers/base.rb', line 23 def run_list [*initializers, *host.run_list] end |