Class: VagrantPlugins::AVF::HelperInstaller
- Inherits:
-
Object
- Object
- VagrantPlugins::AVF::HelperInstaller
- Defined in:
- lib/vagrant_provider_avf/helper_installer.rb
Instance Method Summary collapse
-
#initialize(paths:, command_runner: ->(*command) { Open3.capture3(*command) }) ⇒ HelperInstaller
constructor
A new instance of HelperInstaller.
- #install ⇒ Object
Constructor Details
#initialize(paths:, command_runner: ->(*command) { Open3.capture3(*command) }) ⇒ HelperInstaller
Returns a new instance of HelperInstaller.
6 7 8 9 |
# File 'lib/vagrant_provider_avf/helper_installer.rb', line 6 def initialize(paths:, command_runner: ->(*command) { Open3.capture3(*command) }) @paths = paths @command_runner = command_runner end |
Instance Method Details
#install ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vagrant_provider_avf/helper_installer.rb', line 11 def install @paths.helper_binary_path.dirname.mkpath return @paths.helper_binary_path if up_to_date? build sign @paths.helper_binary_path rescue StandardError => error raise Errors::AvfHelperBuildFailed, error. end |