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


149
150
151
152
# File 'lib/puppet/util/command_line.rb', line 149

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.


154
155
156
# File 'lib/puppet/util/command_line.rb', line 154

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