Class: Hocho::Drivers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/hocho/drivers/base.rb

Direct Known Subclasses

ItamaeSsh, SshBase

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dirObject (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

#hostObject (readonly)

Returns the value of attribute host.



14
15
16
# File 'lib/hocho/drivers/base.rb', line 14

def host
  @host
end

#initializersObject (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

#finalizeObject



20
21
# File 'lib/hocho/drivers/base.rb', line 20

def finalize
end

#run(dry_run: false) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/hocho/drivers/base.rb', line 16

def run(dry_run: false)
  raise NotImplementedError
end

#run_listObject



23
24
25
# File 'lib/hocho/drivers/base.rb', line 23

def run_list
  [*initializers, *host.run_list]
end