Class: R10K::Action::Deploy::Module

Inherits:
Base
  • Object
show all
Includes:
DeployHelpers, Visitor
Defined in:
lib/r10k/action/deploy/module.rb

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary collapse

Attributes inherited from Base

#settings

Instance Method Summary collapse

Methods included from Visitor

#visit

Methods included from DeployHelpers

#check_write_lock!, #expect_config!

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Constructor Details

#initialize(opts, argv, settings = nil) ⇒ Module

Returns a new instance of Module.



15
16
17
18
19
20
21
22
# File 'lib/r10k/action/deploy/module.rb', line 15

def initialize(opts, argv, settings = nil)
  settings ||= {}

  super

  # @force here is used to make it easier to reason about
  @force = !@no_force
end

Instance Attribute Details

#forceObject (readonly)

Returns the value of attribute force.



13
14
15
# File 'lib/r10k/action/deploy/module.rb', line 13

def force
  @force
end

Instance Method Details

#callObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/r10k/action/deploy/module.rb', line 24

def call
  @visit_ok = true

  expect_config!
  deployment = R10K::Deployment.new(@settings)
  check_write_lock!(@settings)

  deployment.accept(self)
  @visit_ok
end