Class: R10K::Action::Runner
- Inherits:
-
Object
- Object
- R10K::Action::Runner
- Defined in:
- lib/r10k/action/runner.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(opts, argv, klass) ⇒ Runner
constructor
A new instance of Runner.
- #instance ⇒ Object
- #setup_logging ⇒ Object
- #setup_settings ⇒ Object
Constructor Details
#initialize(opts, argv, klass) ⇒ Runner
Returns a new instance of Runner.
4 5 6 7 8 |
# File 'lib/r10k/action/runner.rb', line 4 def initialize(opts, argv, klass) @opts = opts @argv = argv @klass = klass end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 |
# File 'lib/r10k/action/runner.rb', line 19 def call setup_logging setup_settings # @todo check arguments instance.call end |
#instance ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/r10k/action/runner.rb', line 10 def instance if @_instance.nil? iopts = @opts.dup iopts.delete(:loglevel) @_instance = @klass.new(iopts, @argv) end @_instance end |
#setup_logging ⇒ Object
26 27 28 29 30 |
# File 'lib/r10k/action/runner.rb', line 26 def setup_logging if @opts.key?(:loglevel) R10K::Logging.level = @opts[:loglevel] end end |
#setup_settings ⇒ Object
32 33 |
# File 'lib/r10k/action/runner.rb', line 32 def setup_settings end |