doc/TaskJuggler/JournalEntryList.html in taskjuggler-0.0.8 vs doc/TaskJuggler/JournalEntryList.html in taskjuggler-0.0.9

- old
+ new

@@ -145,10 +145,12 @@ <li><a href="../TaskJuggler/AttributeBase.html">TaskJuggler::AttributeBase</a></li> <li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li> + <li><a href="../TaskJuggler/AttributeOverwrite.html">TaskJuggler::AttributeOverwrite</a></li> + <li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li> <li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li> <li><a href="../TaskJuggler/BookingListAttribute.html">TaskJuggler::BookingListAttribute</a></li> @@ -223,10 +225,12 @@ <li><a href="../TaskJuggler/HTMLGraphics.html">TaskJuggler::HTMLGraphics</a></li> <li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li> + <li><a href="../TaskJuggler/IntervalList.html">TaskJuggler::IntervalList</a></li> + <li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li> <li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li> <li><a href="../TaskJuggler/Journal.html">TaskJuggler::Journal</a></li> @@ -255,10 +259,12 @@ <li><a href="../TaskJuggler/LogicalExpression.html">TaskJuggler::LogicalExpression</a></li> <li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li> + <li><a href="../TaskJuggler/LogicalExpressionListAttribute.html">TaskJuggler::LogicalExpressionListAttribute</a></li> + <li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li> <li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li> <li><a href="../TaskJuggler/LogicalOperation.html">TaskJuggler::LogicalOperation</a></li> @@ -535,10 +541,12 @@ <li><a href="../TaskJuggler/VimSyntax.html">TaskJuggler::VimSyntax</a></li> <li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li> + <li><a href="../TaskJuggler/WelcomePage.html">TaskJuggler::WelcomePage</a></li> + <li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li> <li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li> <li><a href="../TaskJuggler/XMLBlob.html">TaskJuggler::XMLBlob</a></li> @@ -561,12 +569,10 @@ <li><a href="../RuntimeConfig.html">RuntimeConfig</a></li> <li><a href="../String.html">String</a></li> - <li><a href="../StringIO.html">StringIO</a></li> - </ul> <div id="no-class-search-results" style="display: none;">No matching classes.</div> </div> @@ -617,15 +623,15 @@ <div class="method-source-code" id="new-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 67</span> -67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -68: <span class="ruby-ivar">@entries</span> = [] -69: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">false</span> -70: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 68</span> +68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> +69: <span class="ruby-ivar">@entries</span> = [] +70: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">false</span> +71: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -661,15 +667,15 @@ <div class="method-source-code" id="--source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 78</span> -78: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">entry</span>) -79: <span class="ruby-ivar">@entries</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">entry</span> -80: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">false</span> -81: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 79</span> +79: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">entry</span>) +80: <span class="ruby-ivar">@entries</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">entry</span> +81: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">false</span> +82: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -698,15 +704,15 @@ <div class="method-source-code" id="--source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 92</span> -92: <span class="ruby-keyword kw">def</span><span class="ruby-operator">[]</span>(<span class="ruby-identifier">index</span>) -93: <span class="ruby-identifier">sort!</span> -94: <span class="ruby-ivar">@entries</span>[<span class="ruby-identifier">index</span>] -95: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 93</span> +93: <span class="ruby-keyword kw">def</span><span class="ruby-operator">[]</span>(<span class="ruby-identifier">index</span>) +94: <span class="ruby-identifier">sort!</span> +95: <span class="ruby-ivar">@entries</span>[<span class="ruby-identifier">index</span>] +96: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -735,14 +741,14 @@ <div class="method-source-code" id="count-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 73</span> -73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span> -74: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">length</span> -75: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 74</span> +74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span> +75: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">length</span> +76: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -771,14 +777,14 @@ <div class="method-source-code" id="delete-if-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 106</span> -106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_if</span> -107: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>) } -108: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 107</span> +107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_if</span> +108: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>) } +109: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -807,17 +813,17 @@ <div class="method-source-code" id="each-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 98</span> - 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> - 99: <span class="ruby-identifier">sort!</span> -100: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> -101: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">entry</span> -102: <span class="ruby-keyword kw">end</span> -103: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 99</span> + 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> +100: <span class="ruby-identifier">sort!</span> +101: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> +102: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">entry</span> +103: <span class="ruby-keyword kw">end</span> +104: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -846,14 +852,14 @@ <div class="method-source-code" id="empty--source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 111</span> -111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">empty?</span> -112: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">empty?</span> -113: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 112</span> +112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">empty?</span> +113: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">empty?</span> +114: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -882,15 +888,15 @@ <div class="method-source-code" id="first-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 121</span> -121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first</span> -122: <span class="ruby-identifier">sort!</span> -123: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">first</span> -124: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 122</span> +122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first</span> +123: <span class="ruby-identifier">sort!</span> +124: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">first</span> +125: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -919,14 +925,14 @@ <div class="method-source-code" id="include--source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 116</span> -116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">entry</span>) -117: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">entry</span>) -118: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 117</span> +117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">entry</span>) +118: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">entry</span>) +119: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -959,30 +965,30 @@ <div class="method-source-code" id="last-source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 131</span> -131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last</span>(<span class="ruby-identifier">date</span> = <span class="ruby-keyword kw">nil</span>) -132: <span class="ruby-identifier">result</span> = <span class="ruby-constant">JournalEntryList</span>.<span class="ruby-identifier">new</span> -133: <span class="ruby-identifier">sort!</span> -134: -135: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> -136: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span> -137: <span class="ruby-comment cmt"># We haven't found any yet. So add the first one we find before the</span> -138: <span class="ruby-comment cmt"># cut-off date.</span> -139: <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">date</span> -140: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span> -141: <span class="ruby-comment cmt"># Now we only accept other entries with the exact same date.</span> -142: <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span> -143: <span class="ruby-keyword kw">else</span> -144: <span class="ruby-comment cmt"># We've found all entries we are looking for.</span> -145: <span class="ruby-keyword kw">break</span> -146: <span class="ruby-keyword kw">end</span> -147: <span class="ruby-keyword kw">end</span> -148: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">sort!</span> -149: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 132</span> +132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last</span>(<span class="ruby-identifier">date</span> = <span class="ruby-keyword kw">nil</span>) +133: <span class="ruby-identifier">result</span> = <span class="ruby-constant">JournalEntryList</span>.<span class="ruby-identifier">new</span> +134: <span class="ruby-identifier">sort!</span> +135: +136: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> +137: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span> +138: <span class="ruby-comment cmt"># We haven't found any yet. So add the first one we find before the</span> +139: <span class="ruby-comment cmt"># cut-off date.</span> +140: <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">date</span> +141: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span> +142: <span class="ruby-comment cmt"># Now we only accept other entries with the exact same date.</span> +143: <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span> +144: <span class="ruby-keyword kw">else</span> +145: <span class="ruby-comment cmt"># We've found all entries we are looking for.</span> +146: <span class="ruby-keyword kw">break</span> +147: <span class="ruby-keyword kw">end</span> +148: <span class="ruby-keyword kw">end</span> +149: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">sort!</span> +150: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -1013,26 +1019,26 @@ <div class="method-source-code" id="sort--source"> <pre> - <span class="ruby-comment cmt"># File lib/Journal.rb, line 153</span> -153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sort!</span> -154: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span> -155: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>) } -156: <span class="ruby-keyword kw">else</span> -157: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@sorted</span> -158: -159: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">?</span> -160: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> -161: (<span class="ruby-identifier">a</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">?</span> -162: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">:</span> -163: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">sequenceNo</span> <span class="ruby-operator">&lt;=&gt;</span> -164: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">sequenceNo</span>) } -165: <span class="ruby-keyword kw">end</span> -166: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">true</span> -167: <span class="ruby-keyword kw">self</span> -168: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/Journal.rb, line 154</span> +154: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sort!</span> +155: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span> +156: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>) } +157: <span class="ruby-keyword kw">else</span> +158: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@sorted</span> +159: +160: <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">?</span> +161: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> +162: (<span class="ruby-identifier">a</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">?</span> +163: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">alertLevel</span> <span class="ruby-operator">:</span> +164: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">sequenceNo</span> <span class="ruby-operator">&lt;=&gt;</span> +165: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">property</span>.<span class="ruby-identifier">sequenceNo</span>) } +166: <span class="ruby-keyword kw">end</span> +167: <span class="ruby-ivar">@sorted</span> = <span class="ruby-keyword kw">true</span> +168: <span class="ruby-keyword kw">self</span> +169: <span class="ruby-keyword kw">end</span></pre> </div> </div>