Class: Vagrant::Smartos::Zones::Action::ZoneGate::Enable

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/vagrant/smartos/zones/action/zone_gate/enable.rb

Instance Attribute Summary

Attributes included from Helper

#app, #env

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Enable

Returns a new instance of Enable.



11
12
13
14
# File 'lib/vagrant/smartos/zones/action/zone_gate/enable.rb', line 11

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

Instance Method Details

#call(env) ⇒ Object



16
17
18
19
20
# File 'lib/vagrant/smartos/zones/action/zone_gate/enable.rb', line 16

def call(env)
  app.call(env)
  return unless guest.capability?(:zone_gate_enable)
  guest.capability(:zone_gate_enable) if single_zone_mode?
end