RTFWithQuerySupport
This class is a specialized RichTextFunctionHandler that can be used to query the value of a project or property attribute.
Return a XMLElement tree that represents the navigator in HTML code.
# File lib/taskjuggler/RichText/RTFQuery.rb, line 40 def to_html(args) return nil unless (query = prepareQuery(args)) if query.ok if (rti = query.to_rti) rti.to_html elsif (str = query.to_s) XMLText.new(str) else nil end else error('query_error', query.errorMessage + recreateQuerySyntax(args)) font = XMLElement.new('font', 'color' => '#FF0000') font << XMLText.new('Query Error: ' + query.errorMessage) font end end
Return the result of the query as String.
# File lib/taskjuggler/RichText/RTFQuery.rb, line 29 def to_s(args) return '' unless (query = prepareQuery(args)) if query.ok query.to_s else error('query_error', query.errorMessage + recreateQuerySyntax(args)) 'Query Error: ' + query.errorMessage end end
Generated with the Darkfish Rdoc Generator 2.