Class: VagrantPlugins::HostsUpdater::Action::UpdateHosts

Inherits:
Object
  • Object
show all
Includes:
VagrantPlugins::HostsUpdater
Defined in:
lib/vagrant-multi-hostsupdater/Action/UpdateHosts.rb

Instance Method Summary collapse

Methods included from VagrantPlugins::HostsUpdater

source_root

Constructor Details

#initialize(app, env) ⇒ UpdateHosts

Returns a new instance of UpdateHosts.



9
10
11
12
13
# File 'lib/vagrant-multi-hostsupdater/Action/UpdateHosts.rb', line 9

def initialize(app, env)
  @app = app
  @machine = env[:machine]
  @ui = env[:ui]
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
18
19
# File 'lib/vagrant-multi-hostsupdater/Action/UpdateHosts.rb', line 15

def call(env)
  @ui.info "Checking for host entries"
  @app.call(env)
  addHostEntries()
end