taskjuggler 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -0
- data/benchmarks/depends.tjp +2 -1
- data/benchmarks/htmltaskreport.tjp +2 -1
- data/doc/classes/AppConfig.html +124 -120
- data/doc/classes/Arguments.html +10 -6
- data/doc/classes/Object.html +229 -0
- data/doc/classes/String.html +35 -31
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +34 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
- data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
- data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
- data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
- data/doc/classes/TaskJuggler/Booking.html +22 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
- data/doc/classes/TaskJuggler/CSVFile.html +28 -24
- data/doc/classes/TaskJuggler/Charge.html +22 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
- data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
- data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
- data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
- data/doc/classes/TaskJuggler/GanttChart.html +236 -207
- data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
- data/doc/classes/TaskJuggler/GanttLine.html +28 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
- data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +126 -120
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/JobInfo.html +284 -0
- data/doc/classes/TaskJuggler/Journal.html +197 -0
- data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
- data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
- data/doc/classes/TaskJuggler/Limits.html +68 -62
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
- data/doc/classes/TaskJuggler/Log.html +72 -68
- data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
- data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
- data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
- data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
- data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
- data/doc/classes/TaskJuggler/Macro.html +10 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +40 -36
- data/doc/classes/TaskJuggler/Message.html +16 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
- data/doc/classes/TaskJuggler/Navigator.html +249 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
- data/doc/classes/TaskJuggler/Project.html +1064 -678
- data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
- data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
- data/doc/classes/TaskJuggler/PropertyList.html +114 -113
- data/doc/classes/TaskJuggler/PropertySet.html +355 -312
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
- data/doc/classes/TaskJuggler/Query.html +90 -85
- data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
- data/doc/classes/TaskJuggler/RTPReport.html +301 -0
- data/doc/classes/TaskJuggler/RealFormat.html +114 -57
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
- data/doc/classes/TaskJuggler/Report.html +82 -291
- data/doc/classes/TaskJuggler/ReportBase.html +448 -0
- data/doc/classes/TaskJuggler/ReportContext.html +243 -0
- data/doc/classes/TaskJuggler/ReportTable.html +158 -129
- data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
- data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
- data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
- data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
- data/doc/classes/TaskJuggler/RichText.html +52 -48
- data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
- data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
- data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
- data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
- data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
- data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
- data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
- data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
- data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
- data/doc/classes/TaskJuggler/TableReport.html +1036 -0
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
- data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
- data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
- data/doc/classes/TaskJuggler/TextParser.html +203 -140
- data/doc/classes/TaskJuggler/TextReport.html +364 -0
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
- data/doc/classes/TaskJuggler/TextScanner.html +334 -240
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +547 -497
- data/doc/classes/TaskJuggler/TjpExample.html +29 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
- data/doc/classes/TaskJuggler/UserManual.html +54 -54
- data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
- data/doc/classes/TaskJuggler/XMLElement.html +70 -58
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/classes/TaskJuggler.html +266 -183
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +1 -1
- data/doc/files/lib/Account_rb.html +1 -1
- data/doc/files/lib/Allocation_rb.html +1 -1
- data/doc/files/lib/AppConfig_rb.html +1 -1
- data/doc/files/lib/AttributeBase_rb.html +11 -1
- data/doc/files/lib/AttributeDefinition_rb.html +1 -1
- data/doc/files/lib/Attributes_rb.html +1 -1
- data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
- data/doc/files/lib/Booking_rb.html +1 -1
- data/doc/files/lib/ChargeSet_rb.html +1 -1
- data/doc/files/lib/Charge_rb.html +1 -1
- data/doc/files/lib/HTMLDocument_rb.html +1 -1
- data/doc/files/lib/Interval_rb.html +1 -1
- data/doc/files/lib/Journal_rb.html +106 -0
- data/doc/files/lib/KeywordArray_rb.html +106 -0
- data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/files/lib/Limits_rb.html +1 -1
- data/doc/files/lib/Log_rb.html +1 -1
- data/doc/files/lib/LogicalExpression_rb.html +1 -3
- data/doc/files/lib/LogicalFunction_rb.html +1 -1
- data/doc/files/lib/LogicalOperation_rb.html +1 -1
- data/doc/files/lib/MacroParser_rb.html +1 -1
- data/doc/files/lib/MacroTable_rb.html +1 -1
- data/doc/files/lib/MessageHandler_rb.html +1 -1
- data/doc/files/lib/Message_rb.html +1 -1
- data/doc/files/lib/ProjectFileParser_rb.html +5 -1
- data/doc/files/lib/Project_rb.html +5 -1
- data/doc/files/lib/PropertyList_rb.html +1 -1
- data/doc/files/lib/PropertySet_rb.html +1 -1
- data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
- data/doc/files/lib/Query_rb.html +1 -1
- data/doc/files/lib/RTPNavigator_rb.html +120 -0
- data/doc/files/lib/RTPReport_rb.html +118 -0
- data/doc/files/lib/RealFormat_rb.html +1 -1
- data/doc/files/lib/ResourceScenario_rb.html +1 -1
- data/doc/files/lib/Resource_rb.html +1 -1
- data/doc/files/lib/RichTextDocument_rb.html +1 -1
- data/doc/files/lib/RichTextElement_rb.html +1 -1
- data/doc/files/lib/RichTextParser_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
- data/doc/files/lib/RichTextScanner_rb.html +1 -1
- data/doc/files/lib/RichTextSnip_rb.html +1 -1
- data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
- data/doc/files/lib/RichText_rb.html +1 -1
- data/doc/files/lib/ScenarioData_rb.html +1 -1
- data/doc/files/lib/Scenario_rb.html +1 -1
- data/doc/files/lib/Scoreboard_rb.html +1 -1
- data/doc/files/lib/ShiftAssignments_rb.html +1 -1
- data/doc/files/lib/ShiftScenario_rb.html +1 -1
- data/doc/files/lib/Shift_rb.html +1 -1
- data/doc/files/lib/SourceFileInfo_rb.html +1 -1
- data/doc/files/lib/SyntaxReference_rb.html +1 -1
- data/doc/files/lib/TOCEntry_rb.html +1 -1
- data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
- data/doc/files/lib/TableOfContents_rb.html +1 -1
- data/doc/files/lib/TaskDependency_rb.html +1 -1
- data/doc/files/lib/TaskJuggler_rb.html +1 -1
- data/doc/files/lib/TaskScenario_rb.html +1 -1
- data/doc/files/lib/Task_rb.html +1 -1
- data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
- data/doc/files/lib/TextParser/Rule_rb.html +1 -1
- data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
- data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
- data/doc/files/lib/TextParser_rb.html +1 -1
- data/doc/files/lib/TextScanner_rb.html +1 -1
- data/doc/files/lib/Tj3Config_rb.html +1 -1
- data/doc/files/lib/TjException_rb.html +1 -1
- data/doc/files/lib/TjTime_rb.html +1 -1
- data/doc/files/lib/TjpExample_rb.html +1 -1
- data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
- data/doc/files/lib/UTF8String_rb.html +1 -1
- data/doc/files/lib/UserManual_rb.html +1 -1
- data/doc/files/lib/WorkingHours_rb.html +1 -1
- data/doc/files/lib/XMLDocument_rb.html +1 -1
- data/doc/files/lib/XMLElement_rb.html +1 -1
- data/doc/files/lib/deep_copy_rb.html +106 -0
- data/doc/files/lib/ms_test_rb.html +90 -0
- data/doc/files/lib/reports/CSVFile_rb.html +1 -1
- data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
- data/doc/files/lib/reports/GanttChart_rb.html +1 -1
- data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
- data/doc/files/lib/reports/GanttLine_rb.html +1 -1
- data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
- data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
- data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
- data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
- data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
- data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
- data/doc/files/lib/reports/ReportBase_rb.html +106 -0
- data/doc/files/lib/reports/ReportContext_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/files/lib/reports/ReportTable_rb.html +1 -1
- data/doc/files/lib/reports/Report_rb.html +8 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
- data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
- data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
- data/doc/files/lib/reports/TextReport_rb.html +116 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
- data/doc/files/lib/taskjuggler3_rb.html +61 -56
- data/doc/files/lib/tj3man_rb.html +1 -1
- data/doc/fr_class_index.html +41 -3
- data/doc/fr_file_index.html +21 -5
- data/doc/fr_method_index.html +1069 -959
- data/examples/ContactList.html +1467 -0
- data/examples/Deliveries.html +485 -0
- data/examples/Development.html +2525 -0
- data/examples/Overview.html +747 -0
- data/examples/Resource Graph.html +616 -0
- data/examples/tutorial.tjp +63 -67
- data/lib/AttributeBase.rb +27 -31
- data/lib/AttributeDefinition.rb +12 -7
- data/lib/Attributes.rb +134 -34
- data/lib/Interval.rb +2 -0
- data/lib/Journal.rb +44 -0
- data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
- data/lib/KeywordDocumentation.rb +84 -47
- data/lib/Limits.rb +7 -5
- data/lib/LogicalExpression.rb +1 -1
- data/lib/LogicalOperation.rb +33 -0
- data/lib/Project.rb +313 -99
- data/lib/ProjectFileParser.rb +88 -11
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +13 -4
- data/lib/PropertyTreeNode.rb +34 -15
- data/lib/Query.rb +2 -1
- data/lib/RTPNavigator.rb +53 -0
- data/lib/RTPReport.rb +62 -0
- data/lib/RealFormat.rb +28 -10
- data/lib/RichTextElement.rb +18 -12
- data/lib/RichTextParser.rb +1 -0
- data/lib/RichTextProtocolExample.rb +8 -11
- data/lib/RichTextProtocolHandler.rb +11 -1
- data/lib/RichTextScanner.rb +308 -164
- data/lib/RichTextSyntaxRules.rb +24 -0
- data/lib/TableColumnDefinition.rb +5 -1
- data/lib/TaskJuggler.rb +3 -2
- data/lib/TaskScenario.rb +123 -31
- data/lib/TextParser.rb +14 -3
- data/lib/TextScanner.rb +210 -34
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +15 -0
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +674 -473
- data/lib/WorkingHours.rb +1 -1
- data/lib/XMLElement.rb +11 -3
- data/lib/deep_copy.rb +72 -0
- data/lib/ms_test.rb +27 -0
- data/lib/reports/ColumnTable.rb +7 -5
- data/lib/reports/GanttChart.rb +60 -34
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttRouter.rb +7 -5
- data/lib/reports/Navigator.rb +72 -0
- data/lib/reports/Report.rb +58 -73
- data/lib/reports/ReportBase.rb +241 -0
- data/lib/reports/ReportContext.rb +41 -0
- data/lib/reports/ReportTable.rb +7 -2
- data/lib/reports/ReportTableCell.rb +3 -3
- data/lib/reports/ResourceListRE.rb +19 -26
- data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
- data/lib/reports/TaskListRE.rb +16 -24
- data/lib/reports/TextReport.rb +87 -0
- data/lib/reports/TjpExportRE.rb +55 -50
- data/lib/taskjuggler3.rb +6 -1
- data/manual/Getting_Started +57 -6
- data/manual/How_To_Contribute +2 -4
- data/manual/Intro +2 -2
- data/manual/Reporting_Bugs +9 -2
- data/manual/Rich_Text_Attributes +41 -0
- data/manual/Tutorial +219 -173
- data/tasks/test.rake +3 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
- data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
- data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
- data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
- data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
- data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
- data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
- data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
- data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
- data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
- data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
- data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
- data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
- data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
- data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
- data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
- data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
- data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
- data/test/all.rb +1 -16
- data/test/test_CSV-Reports.rb +8 -5
- data/test/test_Query.rb +2 -2
- data/test/test_RichText.rb +95 -0
- data/test/test_Scheduler.rb +8 -4
- data/test/test_Syntax.rb +8 -4
- data/test/test_deep_copy.rb +83 -0
- metadata +549 -487
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
- data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
- data/lib/reports/ReportElement.rb +0 -427
- data/test/TestSuite/Syntax/Correct/csvtest +0 -16
- data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Class: TaskJuggler::RTPReport [TaskJuggler III API documentation]</title>
|
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
8
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
// <![CDATA[
|
|
11
|
+
|
|
12
|
+
function popupCode( url ) {
|
|
13
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function toggleCode( id ) {
|
|
17
|
+
if ( document.getElementById )
|
|
18
|
+
elem = document.getElementById( id );
|
|
19
|
+
else if ( document.all )
|
|
20
|
+
elem = eval( "document.all." + id );
|
|
21
|
+
else
|
|
22
|
+
return false;
|
|
23
|
+
|
|
24
|
+
elemStyle = elem.style;
|
|
25
|
+
|
|
26
|
+
if ( elemStyle.display != "block" ) {
|
|
27
|
+
elemStyle.display = "block"
|
|
28
|
+
} else {
|
|
29
|
+
elemStyle.display = "none"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Make codeblocks hidden by default
|
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
|
37
|
+
|
|
38
|
+
// ]]>
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div id="classHeader">
|
|
46
|
+
<table class="header-table">
|
|
47
|
+
<tr class="top-aligned-row">
|
|
48
|
+
<td><strong>Class</strong></td>
|
|
49
|
+
<td class="class-name-in-header">TaskJuggler::RTPReport</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>In:</strong></td>
|
|
53
|
+
<td>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<a href="../../files/lib/RTPReport_rb.html">
|
|
57
|
+
|
|
58
|
+
lib/RTPReport.rb
|
|
59
|
+
|
|
60
|
+
</a>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<br />
|
|
64
|
+
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<tr class="top-aligned-row">
|
|
70
|
+
<td><strong>Parent:</strong></td>
|
|
71
|
+
<td>
|
|
72
|
+
|
|
73
|
+
<a href="RichTextProtocolHandler.html">
|
|
74
|
+
|
|
75
|
+
TaskJuggler::RichTextProtocolHandler
|
|
76
|
+
|
|
77
|
+
</a>
|
|
78
|
+
|
|
79
|
+
</td>
|
|
80
|
+
</tr>
|
|
81
|
+
|
|
82
|
+
</table>
|
|
83
|
+
</div>
|
|
84
|
+
<!-- banner header -->
|
|
85
|
+
|
|
86
|
+
<div id="bodyContent">
|
|
87
|
+
|
|
88
|
+
<div id="contextContent">
|
|
89
|
+
|
|
90
|
+
<div id="description">
|
|
91
|
+
<p>
|
|
92
|
+
This class is a specialized <a
|
|
93
|
+
href="RichTextProtocolHandler.html">RichTextProtocolHandler</a> that
|
|
94
|
+
includes a report into the <a href="RichText.html">RichText</a> output for
|
|
95
|
+
supported formats.
|
|
96
|
+
</p>
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<div id="method-list">
|
|
104
|
+
<h3 class="section-bar">Methods</h3>
|
|
105
|
+
|
|
106
|
+
<div class="name-list">
|
|
107
|
+
|
|
108
|
+
<a href="#M000234">new</a>
|
|
109
|
+
|
|
110
|
+
<a href="#M000236">to_html</a>
|
|
111
|
+
|
|
112
|
+
<a href="#M000235">to_s</a>
|
|
113
|
+
|
|
114
|
+
<a href="#M000237">to_tagged</a>
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- if includes -->
|
|
122
|
+
|
|
123
|
+
<div id="section">
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<!-- if method_list -->
|
|
129
|
+
|
|
130
|
+
<div id="methods">
|
|
131
|
+
|
|
132
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<div id="method-M000234" class="method-detail">
|
|
136
|
+
<a name="M000234"></a>
|
|
137
|
+
|
|
138
|
+
<div class="method-heading">
|
|
139
|
+
|
|
140
|
+
<a href="#M000234" class="method-signature">
|
|
141
|
+
|
|
142
|
+
<span class="method-name">new</span><span class="method-args">(project, sourceFileInfo)</span>
|
|
143
|
+
|
|
144
|
+
</a>
|
|
145
|
+
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div class="method-description">
|
|
149
|
+
|
|
150
|
+
<p><a class="source-toggle" href="#"
|
|
151
|
+
onclick="toggleCode('M000234-source');return false;">[Source]</a></p>
|
|
152
|
+
<div class="method-source-code" id="M000234-source">
|
|
153
|
+
<pre>
|
|
154
|
+
<span class="ruby-comment cmt"># File lib/RTPReport.rb, line 22</span>
|
|
155
|
+
22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">sourceFileInfo</span>)
|
|
156
|
+
23: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">project</span>, <span class="ruby-value str">'report'</span>, <span class="ruby-identifier">sourceFileInfo</span>)
|
|
157
|
+
24: <span class="ruby-keyword kw">end</span>
|
|
158
|
+
</pre>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
<div id="method-M000236" class="method-detail">
|
|
169
|
+
<a name="M000236"></a>
|
|
170
|
+
|
|
171
|
+
<div class="method-heading">
|
|
172
|
+
|
|
173
|
+
<a href="#M000236" class="method-signature">
|
|
174
|
+
|
|
175
|
+
<span class="method-name">to_html</span><span class="method-args">(args)</span>
|
|
176
|
+
|
|
177
|
+
</a>
|
|
178
|
+
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div class="method-description">
|
|
182
|
+
|
|
183
|
+
<p>
|
|
184
|
+
Return a HTML tree for the report.
|
|
185
|
+
</p>
|
|
186
|
+
|
|
187
|
+
<p><a class="source-toggle" href="#"
|
|
188
|
+
onclick="toggleCode('M000236-source');return false;">[Source]</a></p>
|
|
189
|
+
<div class="method-source-code" id="M000236-source">
|
|
190
|
+
<pre>
|
|
191
|
+
<span class="ruby-comment cmt"># File lib/RTPReport.rb, line 32</span>
|
|
192
|
+
32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_html</span>(<span class="ruby-identifier">args</span>)
|
|
193
|
+
33: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">id</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">'id'</span>]).<span class="ruby-identifier">nil?</span>
|
|
194
|
+
34: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'rtp_report_id'</span>,
|
|
195
|
+
35: <span class="ruby-value str">"Argument 'id' missing to specify the report to be used."</span>)
|
|
196
|
+
36: <span class="ruby-keyword kw">end</span>
|
|
197
|
+
37: <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">report</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">report</span>(<span class="ruby-identifier">id</span>))
|
|
198
|
+
38: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'rtp_report_unknown_id'</span>, <span class="ruby-node">"Unknown report #{id}"</span>)
|
|
199
|
+
39: <span class="ruby-keyword kw">end</span>
|
|
200
|
+
40:
|
|
201
|
+
41: <span class="ruby-comment cmt"># Save the old report context record</span>
|
|
202
|
+
42: <span class="ruby-identifier">oldReportContext</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContext</span>
|
|
203
|
+
43: <span class="ruby-comment cmt"># Create a new context for the report.</span>
|
|
204
|
+
44: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContext</span> = <span class="ruby-constant">ReportContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">report</span>)
|
|
205
|
+
45: <span class="ruby-comment cmt"># Generate the report with the new context</span>
|
|
206
|
+
46: <span class="ruby-identifier">report</span>.<span class="ruby-identifier">generate</span>
|
|
207
|
+
47: <span class="ruby-identifier">html</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">to_html</span>
|
|
208
|
+
48: <span class="ruby-comment cmt"># Restore the global report context record again.</span>
|
|
209
|
+
49: <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">reportContext</span> = <span class="ruby-identifier">oldReportContext</span>
|
|
210
|
+
50:
|
|
211
|
+
51: <span class="ruby-identifier">html</span>
|
|
212
|
+
52: <span class="ruby-keyword kw">end</span>
|
|
213
|
+
</pre>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<div id="method-M000235" class="method-detail">
|
|
221
|
+
<a name="M000235"></a>
|
|
222
|
+
|
|
223
|
+
<div class="method-heading">
|
|
224
|
+
|
|
225
|
+
<a href="#M000235" class="method-signature">
|
|
226
|
+
|
|
227
|
+
<span class="method-name">to_s</span><span class="method-args">(args)</span>
|
|
228
|
+
|
|
229
|
+
</a>
|
|
230
|
+
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div class="method-description">
|
|
234
|
+
|
|
235
|
+
<p>
|
|
236
|
+
Not supported for this protocol
|
|
237
|
+
</p>
|
|
238
|
+
|
|
239
|
+
<p><a class="source-toggle" href="#"
|
|
240
|
+
onclick="toggleCode('M000235-source');return false;">[Source]</a></p>
|
|
241
|
+
<div class="method-source-code" id="M000235-source">
|
|
242
|
+
<pre>
|
|
243
|
+
<span class="ruby-comment cmt"># File lib/RTPReport.rb, line 27</span>
|
|
244
|
+
27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">args</span>)
|
|
245
|
+
28: <span class="ruby-value str">''</span>
|
|
246
|
+
29: <span class="ruby-keyword kw">end</span>
|
|
247
|
+
</pre>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<div id="method-M000237" class="method-detail">
|
|
255
|
+
<a name="M000237"></a>
|
|
256
|
+
|
|
257
|
+
<div class="method-heading">
|
|
258
|
+
|
|
259
|
+
<a href="#M000237" class="method-signature">
|
|
260
|
+
|
|
261
|
+
<span class="method-name">to_tagged</span><span class="method-args">(args)</span>
|
|
262
|
+
|
|
263
|
+
</a>
|
|
264
|
+
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div class="method-description">
|
|
268
|
+
|
|
269
|
+
<p>
|
|
270
|
+
Not supported for this protocol.
|
|
271
|
+
</p>
|
|
272
|
+
|
|
273
|
+
<p><a class="source-toggle" href="#"
|
|
274
|
+
onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
|
|
275
|
+
<div class="method-source-code" id="M000237-source">
|
|
276
|
+
<pre>
|
|
277
|
+
<span class="ruby-comment cmt"># File lib/RTPReport.rb, line 55</span>
|
|
278
|
+
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_tagged</span>(<span class="ruby-identifier">args</span>)
|
|
279
|
+
56: <span class="ruby-keyword kw">nil</span>
|
|
280
|
+
57: <span class="ruby-keyword kw">end</span>
|
|
281
|
+
</pre>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<div id="validator-badges">
|
|
297
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
</body>
|
|
301
|
+
</html>
|
|
@@ -70,8 +70,12 @@
|
|
|
70
70
|
<td><strong>Parent:</strong></td>
|
|
71
71
|
<td>
|
|
72
72
|
|
|
73
|
+
<a href="../Object.html">
|
|
74
|
+
|
|
73
75
|
Object
|
|
74
76
|
|
|
77
|
+
</a>
|
|
78
|
+
|
|
75
79
|
</td>
|
|
76
80
|
</tr>
|
|
77
81
|
|
|
@@ -89,6 +93,21 @@ This class provides the functionality to format a Float according to
|
|
|
89
93
|
certain rules. These rules determine how negative values are represented,
|
|
90
94
|
how the fractional part is shown and how to structure the mantissa. The
|
|
91
95
|
result is always a <a href="../String.html">String</a>.
|
|
96
|
+
</p>
|
|
97
|
+
<p>
|
|
98
|
+
The class uses the following parameters to control the formating.
|
|
99
|
+
signPrefix: Prefix used for negative numbers. (<a
|
|
100
|
+
href="../String.html">String</a>) signSuffix: Suffix used for negative
|
|
101
|
+
numbers. (<a href="../String.html">String</a>) thousandsSeparator:
|
|
102
|
+
Separator used after 3 integer digits. (<a
|
|
103
|
+
href="../String.html">String</a>) fractionSeparator: Separator used between
|
|
104
|
+
the inter part and the
|
|
105
|
+
</p>
|
|
106
|
+
<pre>
|
|
107
|
+
fractional part. (String)
|
|
108
|
+
</pre>
|
|
109
|
+
<p>
|
|
110
|
+
fractionDigits: Number of fractional digits to show. (Fixnum)
|
|
92
111
|
</p>
|
|
93
112
|
|
|
94
113
|
</div>
|
|
@@ -101,9 +120,11 @@ result is always a <a href="../String.html">String</a>.
|
|
|
101
120
|
|
|
102
121
|
<div class="name-list">
|
|
103
122
|
|
|
104
|
-
<a href="#
|
|
123
|
+
<a href="#M000978">format</a>
|
|
124
|
+
|
|
125
|
+
<a href="#M000977">new</a>
|
|
105
126
|
|
|
106
|
-
<a href="#
|
|
127
|
+
<a href="#M000979">to_s</a>
|
|
107
128
|
|
|
108
129
|
</div>
|
|
109
130
|
</div>
|
|
@@ -124,12 +145,12 @@ result is always a <a href="../String.html">String</a>.
|
|
|
124
145
|
<h3 class="section-bar">Public Class methods</h3>
|
|
125
146
|
|
|
126
147
|
|
|
127
|
-
<div id="method-
|
|
128
|
-
<a name="
|
|
148
|
+
<div id="method-M000977" class="method-detail">
|
|
149
|
+
<a name="M000977"></a>
|
|
129
150
|
|
|
130
151
|
<div class="method-heading">
|
|
131
152
|
|
|
132
|
-
<a href="#
|
|
153
|
+
<a href="#M000977" class="method-signature">
|
|
133
154
|
|
|
134
155
|
<span class="method-name">new</span><span class="method-args">(args)</span>
|
|
135
156
|
|
|
@@ -145,22 +166,27 @@ formating rules.
|
|
|
145
166
|
</p>
|
|
146
167
|
|
|
147
168
|
<p><a class="source-toggle" href="#"
|
|
148
|
-
onclick="toggleCode('
|
|
149
|
-
<div class="method-source-code" id="
|
|
169
|
+
onclick="toggleCode('M000977-source');return false;">[Source]</a></p>
|
|
170
|
+
<div class="method-source-code" id="M000977-source">
|
|
150
171
|
<pre>
|
|
151
|
-
<span class="ruby-comment cmt"># File lib/RealFormat.rb, line
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
172
|
+
<span class="ruby-comment cmt"># File lib/RealFormat.rb, line 30</span>
|
|
173
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
|
|
174
|
+
31: <span class="ruby-identifier">iVars</span> = <span class="ruby-node">%w( @signPrefix @signSuffix @thousandsSeparator
|
|
175
|
+
32: @fractionSeparator @fractionDigits )</span>
|
|
176
|
+
33: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">RealFormat</span>)
|
|
177
|
+
34: <span class="ruby-comment cmt"># The argument is another RealFormat object.</span>
|
|
178
|
+
35: <span class="ruby-identifier">iVars</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">iVar</span><span class="ruby-operator">|</span>
|
|
179
|
+
36: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">iVar</span>, <span class="ruby-identifier">args</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">iVar</span>))
|
|
180
|
+
37: <span class="ruby-keyword kw">end</span>
|
|
181
|
+
38: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">5</span>
|
|
182
|
+
39: <span class="ruby-comment cmt"># The argument is a list of values.</span>
|
|
183
|
+
40: <span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-value">4</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
184
|
+
41: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">iVars</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span>])
|
|
185
|
+
42: <span class="ruby-keyword kw">end</span>
|
|
186
|
+
43: <span class="ruby-keyword kw">else</span>
|
|
187
|
+
44: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">"Bad number of parameters #{args.length}"</span>
|
|
188
|
+
45: <span class="ruby-keyword kw">end</span>
|
|
189
|
+
46: <span class="ruby-keyword kw">end</span>
|
|
164
190
|
</pre>
|
|
165
191
|
</div>
|
|
166
192
|
|
|
@@ -171,12 +197,12 @@ formating rules.
|
|
|
171
197
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
172
198
|
|
|
173
199
|
|
|
174
|
-
<div id="method-
|
|
175
|
-
<a name="
|
|
200
|
+
<div id="method-M000978" class="method-detail">
|
|
201
|
+
<a name="M000978"></a>
|
|
176
202
|
|
|
177
203
|
<div class="method-heading">
|
|
178
204
|
|
|
179
|
-
<a href="#
|
|
205
|
+
<a href="#M000978" class="method-signature">
|
|
180
206
|
|
|
181
207
|
<span class="method-name">format</span><span class="method-args">(number)</span>
|
|
182
208
|
|
|
@@ -193,42 +219,73 @@ rules.
|
|
|
193
219
|
</p>
|
|
194
220
|
|
|
195
221
|
<p><a class="source-toggle" href="#"
|
|
196
|
-
onclick="toggleCode('
|
|
197
|
-
<div class="method-source-code" id="
|
|
222
|
+
onclick="toggleCode('M000978-source');return false;">[Source]</a></p>
|
|
223
|
+
<div class="method-source-code" id="M000978-source">
|
|
198
224
|
<pre>
|
|
199
|
-
<span class="ruby-comment cmt"># File lib/RealFormat.rb, line
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
50: <span class="ruby-keyword kw">end</span>
|
|
214
|
-
51: <span class="ruby-identifier">intPart</span> = <span class="ruby-identifier">intNumber</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span>(<span class="ruby-ivar">@fractionDigits</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)]
|
|
215
|
-
52: <span class="ruby-identifier">fracPart</span> =
|
|
216
|
-
53: <span class="ruby-ivar">@fractionDigits</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'.'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">intNumber</span>[<span class="ruby-operator">-</span>(<span class="ruby-ivar">@fractionDigits</span>)<span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">''</span>
|
|
217
|
-
54:
|
|
218
|
-
55: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@thousandsSeparator</span>.<span class="ruby-identifier">empty?</span>
|
|
219
|
-
56: <span class="ruby-identifier">out</span> = <span class="ruby-identifier">intPart</span>
|
|
220
|
-
57: <span class="ruby-keyword kw">else</span>
|
|
221
|
-
58: <span class="ruby-identifier">out</span> = <span class="ruby-value str">''</span>
|
|
222
|
-
59: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">intPart</span>.<span class="ruby-identifier">length</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
223
|
-
60: <span class="ruby-identifier">out</span> = <span class="ruby-identifier">intPart</span>[<span class="ruby-operator">-</span><span class="ruby-identifier">i</span>, <span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span>
|
|
224
|
-
61: <span class="ruby-identifier">out</span> = <span class="ruby-ivar">@thousandsSeparator</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-value">3</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">intPart</span>.<span class="ruby-identifier">length</span>
|
|
225
|
-
62: <span class="ruby-keyword kw">end</span>
|
|
225
|
+
<span class="ruby-comment cmt"># File lib/RealFormat.rb, line 50</span>
|
|
226
|
+
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">number</span>)
|
|
227
|
+
51: <span class="ruby-comment cmt"># Check for negative number. Continue with the absolute part.</span>
|
|
228
|
+
52: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">number</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>
|
|
229
|
+
53: <span class="ruby-identifier">negate</span> = <span class="ruby-keyword kw">true</span>
|
|
230
|
+
54: <span class="ruby-identifier">number</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">number</span>
|
|
231
|
+
55: <span class="ruby-keyword kw">else</span>
|
|
232
|
+
56: <span class="ruby-identifier">negate</span> = <span class="ruby-keyword kw">false</span>
|
|
233
|
+
57: <span class="ruby-keyword kw">end</span>
|
|
234
|
+
58:
|
|
235
|
+
59: <span class="ruby-comment cmt"># Determine the integer part.</span>
|
|
236
|
+
60: <span class="ruby-identifier">intNumber</span> = (<span class="ruby-identifier">number</span> <span class="ruby-operator">*</span> (<span class="ruby-value">10</span> <span class="ruby-operator">**</span> <span class="ruby-ivar">@fractionDigits</span>)).<span class="ruby-identifier">round</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>
|
|
237
|
+
61: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">intNumber</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"><=</span> <span class="ruby-ivar">@fractionDigits</span>
|
|
238
|
+
62: <span class="ruby-identifier">intNumber</span> = <span class="ruby-value str">'0'</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@fractionDigits</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">intNumber</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">intNumber</span>
|
|
226
239
|
63: <span class="ruby-keyword kw">end</span>
|
|
227
|
-
64: <span class="ruby-identifier">
|
|
228
|
-
65: <span class="ruby-
|
|
229
|
-
66:
|
|
230
|
-
67:
|
|
231
|
-
68:
|
|
240
|
+
64: <span class="ruby-identifier">intPart</span> = <span class="ruby-identifier">intNumber</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span>(<span class="ruby-ivar">@fractionDigits</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)]
|
|
241
|
+
65: <span class="ruby-identifier">fracPart</span> =
|
|
242
|
+
66: <span class="ruby-ivar">@fractionDigits</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'.'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">intNumber</span>[<span class="ruby-operator">-</span>(<span class="ruby-ivar">@fractionDigits</span>)<span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">''</span>
|
|
243
|
+
67:
|
|
244
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@thousandsSeparator</span>.<span class="ruby-identifier">empty?</span>
|
|
245
|
+
69: <span class="ruby-identifier">out</span> = <span class="ruby-identifier">intPart</span>
|
|
246
|
+
70: <span class="ruby-keyword kw">else</span>
|
|
247
|
+
71: <span class="ruby-identifier">out</span> = <span class="ruby-value str">''</span>
|
|
248
|
+
72: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">intPart</span>.<span class="ruby-identifier">length</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
249
|
+
73: <span class="ruby-identifier">out</span> = <span class="ruby-identifier">intPart</span>[<span class="ruby-operator">-</span><span class="ruby-identifier">i</span>, <span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span>
|
|
250
|
+
74: <span class="ruby-identifier">out</span> = <span class="ruby-ivar">@thousandsSeparator</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-value">3</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">intPart</span>.<span class="ruby-identifier">length</span>
|
|
251
|
+
75: <span class="ruby-keyword kw">end</span>
|
|
252
|
+
76: <span class="ruby-keyword kw">end</span>
|
|
253
|
+
77: <span class="ruby-identifier">out</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">fracPart</span>
|
|
254
|
+
78: <span class="ruby-comment cmt"># Now compose the result.</span>
|
|
255
|
+
79: <span class="ruby-identifier">out</span> = <span class="ruby-ivar">@signPrefix</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">out</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@signSuffix</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">negate</span>
|
|
256
|
+
80: <span class="ruby-identifier">out</span>
|
|
257
|
+
81: <span class="ruby-keyword kw">end</span>
|
|
258
|
+
</pre>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<div id="method-M000979" class="method-detail">
|
|
266
|
+
<a name="M000979"></a>
|
|
267
|
+
|
|
268
|
+
<div class="method-heading">
|
|
269
|
+
|
|
270
|
+
<a href="#M000979" class="method-signature">
|
|
271
|
+
|
|
272
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
273
|
+
|
|
274
|
+
</a>
|
|
275
|
+
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<div class="method-description">
|
|
279
|
+
|
|
280
|
+
<p><a class="source-toggle" href="#"
|
|
281
|
+
onclick="toggleCode('M000979-source');return false;">[Source]</a></p>
|
|
282
|
+
<div class="method-source-code" id="M000979-source">
|
|
283
|
+
<pre>
|
|
284
|
+
<span class="ruby-comment cmt"># File lib/RealFormat.rb, line 83</span>
|
|
285
|
+
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
286
|
+
84: [ <span class="ruby-ivar">@signPrefix</span>, <span class="ruby-ivar">@signSuffix</span>, <span class="ruby-ivar">@thousandsSeparator</span>, <span class="ruby-ivar">@fractionSeparator</span>,
|
|
287
|
+
85: <span class="ruby-ivar">@fractionDigits</span> ].<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-node">"\"#{s}\""</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
|
288
|
+
86: <span class="ruby-keyword kw">end</span>
|
|
232
289
|
</pre>
|
|
233
290
|
</div>
|
|
234
291
|
|