Internal helper class when creating commands - undocumented. @api private
# File lib/puppet/provider.rb, line 245 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 251 def initialize(name, path, confiner) @name = name @path = path @optional = false @confiner = confiner @custom_environment = {} end
# File lib/puppet/provider.rb, line 267 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 263 def environment(env) @custom_environment = @custom_environment.merge(env) end
# File lib/puppet/provider.rb, line 259 def is_optional @optional = true end