Internal helper class when creating commands - undocumented. @api private
# File lib/puppet/provider.rb, line 268 def command if not @optional @confiner.confine :exists => @path, :for_binary => true end Puppet::Provider::Command.new(@name, @path, Puppet::Util, Puppet::Util::Execution, { :failonfail => true, :combine => true, :custom_environment => @custom_environment }) end
# File lib/puppet/provider.rb, line 264 def environment(env) @custom_environment = @custom_environment.merge(env) end
# File lib/puppet/provider.rb, line 260 def is_optional @optional = true end
# File lib/puppet/provider.rb, line 246 def self.define(name, path, confiner, &block) definer = new(name, path, confiner) definer.instance_eval(&block) if block definer.command end
# File lib/puppet/provider.rb, line 252 def initialize(name, path, confiner) @name = name @path = path @optional = false @confiner = confiner @custom_environment = {} end