Class: VagrantPlugins::ArubaCloud::Action::DisableRequireTty
- Inherits:
-
Object
- Object
- VagrantPlugins::ArubaCloud::Action::DisableRequireTty
- Defined in:
- lib/vagrant-arubacloud/action/disable_requiretty.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ DisableRequireTty
constructor
A new instance of DisableRequireTty.
Constructor Details
#initialize(app, env) ⇒ DisableRequireTty
Returns a new instance of DisableRequireTty.
5 6 7 8 |
# File 'lib/vagrant-arubacloud/action/disable_requiretty.rb', line 5 def initialize(app, env) @app = app @machine = env[:machine] end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vagrant-arubacloud/action/disable_requiretty.rb', line 10 def call(env) unless @machine.guest.capability?(:disable_requiretty) @machine.ui.warn(I18n.t('vagrant_arubacloud.disable_require_tty_cap_not_found')) return end @machine.ui.detail(I18n.t('vagrant_arubacloud.disabling_requiretty')) @machine.guest.capability(:disable_requiretty) @app.call(env) end |