Class: VagrantPlugins::Scaleway::Action::WarnNetworks

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-scaleway/action/warn_networks.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, _env) ⇒ WarnNetworks

Returns a new instance of WarnNetworks.



5
6
7
# File 'lib/vagrant-scaleway/action/warn_networks.rb', line 5

def initialize(app, _env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/vagrant-scaleway/action/warn_networks.rb', line 9

def call(env)
  if env[:machine].config.vm.networks.length > 1
    env[:ui].warn(I18n.t('vagrant_scaleway.warn_networks'))
  end

  @app.call(env)
end