Module: Vagrant::Util

Included in:
Actions::Base, Actions::Runner, Busy, Commands, Downloaders::Base, Environment, Provisioners::Base, SSH, VM
Defined in:
lib/vagrant/util.rb,
lib/vagrant/util/errors.rb,
lib/vagrant/util/template_renderer.rb,
lib/vagrant/util/stacked_proc_runner.rb

Defined Under Namespace

Modules: StackedProcRunner Classes: Errors, TemplateRenderer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/vagrant/util.rb', line 3

def self.included(base)
  base.extend Vagrant::Util
end

Instance Method Details

#error_and_exit(key, data = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/vagrant/util.rb', line 13

def error_and_exit(key, data = {})
  abort <<-error
=====================================================================
Vagrant experienced an error!

#{Errors.error_string(key, data).chomp}
=====================================================================
error
end

#loggerObject



23
24
25
# File 'lib/vagrant/util.rb', line 23

def logger
  Logger.singleton_logger
end

#wrap_outputObject



7
8
9
10
11
# File 'lib/vagrant/util.rb', line 7

def wrap_output
  puts "====================================================================="
  yield
  puts "====================================================================="
end