Class: VagrantPlugins::VagrantVmwareDhcp::Action::ConfigDhcp

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-vmware-dhcp/action/config_dhcp.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ ConfigDhcp

Returns a new instance of ConfigDhcp.



9
10
11
12
13
# File 'lib/vagrant-vmware-dhcp/action/config_dhcp.rb', line 9

def initialize(app, env)
  @app    = app
  @env    = env
  @logger = Log4r::Logger.new("vagrant::plugins::vagrant-vmware-dhcp::config_dhcp")
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vagrant-vmware-dhcp/action/config_dhcp.rb', line 15

def call(env)
  @env = env

  if @env[:machine]
    if @env[:machine].provider_name == :vmware_fusion or @env[:machine].provider_name == :vmware_workstation
      configure_dhcp(@env[:machine])
    end
  end

  @app.call(@env)
end