Executes the given command and returns the standard output. All special HTML characters are escaped.
Execute the command and return the standard output.
# File lib/webgen/tag/executecommand.rb, line 18
18: def call(tag, body, context)
19: command = param('tag.executecommand.command')
20: output = `#{command} 2> #{BIT_BUCKET}`
21: if $?.exitstatus != 0
22: raise Webgen::RenderError.new("Command '#{command}' has return value != 0: #{output}",
23: self.class.name, context.dest_node, context.ref_node)
24: end
25: output = CGI::escapeHTML(output) if param('tag.executecommand.escape_html')
26: [output, param('tag.executecommand.process_output')]
27: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.