Class: TaskJuggler::TjpExportRE
- Inherits:
-
ReportBase
- Object
- ReportBase
- TaskJuggler::TjpExportRE
- Defined in:
- lib/taskjuggler/reports/TjpExportRE.rb
Overview
This specialization of ReportBase implements an export of the project data in the TJP syntax format.
Instance Method Summary collapse
- #generateIntermediateFormat ⇒ Object
-
#initialize(report) ⇒ TjpExportRE
constructor
Create a new object and set some default values.
-
#to_tjp ⇒ Object
Return the project data in TJP syntax format.
Methods inherited from ReportBase
#a, #filterAccountList, #filterResourceList, #filterTaskList
Constructor Details
#initialize(report) ⇒ TjpExportRE
Create a new object and set some default values.
24 25 26 27 28 29 30 31 |
# File 'lib/taskjuggler/reports/TjpExportRE.rb', line 24 def initialize(report) super(report) @supportedTaskAttrs = %w( booking complete depends flags maxend maxstart minend minstart note priority projectid responsible ) @supportedResourceAttrs = %w( booking flags shifts vacation workinghours ) end |
Instance Method Details
#generateIntermediateFormat ⇒ Object
33 34 35 |
# File 'lib/taskjuggler/reports/TjpExportRE.rb', line 33 def generateIntermediateFormat super end |
#to_tjp ⇒ Object
Return the project data in TJP syntax format.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/taskjuggler/reports/TjpExportRE.rb', line 38 def to_tjp # Prepare the resource list. @resourceList = PropertyList.new(@project.resources) @resourceList.setSorting(a('sortResources')) @resourceList = filterResourceList(@resourceList, nil, a('hideResource'), a('rollupResource'), a('openNodes')) @resourceList.sort! # Prepare the task list. @taskList = PropertyList.new(@project.tasks) @taskList.setSorting(a('sortTasks')) @taskList = filterTaskList(@taskList, nil, a('hideTask'), a('rollupTask'), a('openNodes')) @taskList.sort! getBookings @file = +'' generateProjectProperty if a('definitions').include?('project') generateFlagDeclaration if a('definitions').include?('flags') generateProjectIDs if a('definitions').include?('projectids') generateShiftList if a('definitions').include?('shifts') generateResourceList if a('definitions').include?('resources') generateTaskList if a('definitions').include?('tasks') generateTaskAttributes unless a('taskAttributes').empty? generateResourceAttributes unless a('resourceAttributes').empty? @file end |