# File lib/facter/util/resolution.rb, line 132 def setcode(string = nil, &block) if string @code = Proc.new do output = Facter::Core::Execution.execute(string, :on_fail => nil) if output.nil? or output.empty? nil else output end end elsif block_given? @code = block else raise ArgumentError, "You must pass either code or a block" end end