class VagrantPlugins::HostManager::Action::UpdateGuest

Public Class Methods

new(app, env) click to toggle source
# File lib/vagrant-hostmanager/action/update_guest.rb, line 9
def initialize(app, env)
  @app = app
  @machine = env[:machine]
  @updater = HostsFile::Updater.new(@machine.env, env[:provider])
  @logger = Log4r::Logger.new('vagrant::hostmanager::update_guest')
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant-hostmanager/action/update_guest.rb, line 16
def call(env)
  env[:ui].info I18n.t('vagrant_hostmanager.action.update_guest', {
    :name => @machine.name
  })
  @updater.update_guest(@machine)

  @app.call(env)
end