Class: Puppet::Util::CommandLine::ExternalSubcommand Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/command_line.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(path_to_subcommand, command_line) ⇒ ExternalSubcommand

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ExternalSubcommand.



151
152
153
154
# File 'lib/puppet/util/command_line.rb', line 151

def initialize(path_to_subcommand, command_line)
  @path_to_subcommand = path_to_subcommand
  @command_line = command_line
end

Instance Method Details

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



156
157
158
# File 'lib/puppet/util/command_line.rb', line 156

def run
  Kernel.exec(@path_to_subcommand, *@command_line.args)
end