Class: TaskJuggler::RTFNavigator
- Inherits:
-
RichTextFunctionHandler
- Object
- RichTextFunctionHandler
- TaskJuggler::RTFNavigator
- Defined in:
- lib/taskjuggler/RichText/RTFNavigator.rb
Overview
This class is a specialized RichTextFunctionHandler that generates a navigation bar for all reports that match the specified LogicalExpression. It currently only supports HTML.
Instance Attribute Summary
Attributes inherited from RichTextFunctionHandler
Instance Method Summary collapse
-
#initialize(project, sourceFileInfo = nil) ⇒ RTFNavigator
constructor
A new instance of RTFNavigator.
-
#to_html(args) ⇒ Object
Return a XMLElement tree that represents the navigator in HTML code.
-
#to_s(args) ⇒ Object
Not supported for this function.
-
#to_tagged(args) ⇒ Object
Not supported for this function.
Methods included from MessageHandler
#critical, #debug, #error, #fatal, #info, #warning
Constructor Details
#initialize(project, sourceFileInfo = nil) ⇒ RTFNavigator
Returns a new instance of RTFNavigator.
25 26 27 28 29 |
# File 'lib/taskjuggler/RichText/RTFNavigator.rb', line 25 def initialize(project, sourceFileInfo = nil) @project = project super('navigator', sourceFileInfo) @blockFunction = true end |
Instance Method Details
#to_html(args) ⇒ Object
Return a XMLElement tree that represents the navigator in HTML code.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/taskjuggler/RichText/RTFNavigator.rb', line 37 def to_html(args) if args.nil? || (id = args['id']).nil? error('rtf_nav_id_missing', "Argument 'id' missing to specify the navigator to be used.") end unless (navBar = @project['navigators'][id]) error('rtf_nav_unknown_id', "Unknown navigator #{id}") end navBar.to_html end |
#to_s(args) ⇒ Object
Not supported for this function
32 33 34 |
# File 'lib/taskjuggler/RichText/RTFNavigator.rb', line 32 def to_s(args) '' end |
#to_tagged(args) ⇒ Object
Not supported for this function.
49 50 51 |
# File 'lib/taskjuggler/RichText/RTFNavigator.rb', line 49 def to_tagged(args) nil end |