<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>trunk/as2api</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">doc_comment.rb</a></tt></td><td align="right" id="added">+63</td><td></td><td nowrap="nowrap" align="center"><a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb?rev=225&amp;content-type=text/vnd.viewcvs-markup">225</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb.diff?r1=225&amp;r2=226">-&gt;</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb?rev=226&amp;content-type=text/vnd.viewcvs-markup">226</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">html_output.rb</a></tt></td><td align="right" id="added">+13</td><td align="right" id="removed">-87</td><td nowrap="nowrap" align="center"><a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb?rev=225&amp;content-type=text/vnd.viewcvs-markup">225</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb.diff?r1=225&amp;r2=226">-&gt;</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb?rev=226&amp;content-type=text/vnd.viewcvs-markup">226</a></td></tr>
<tr><td></td><td align="right" id="added">+76</td><td align="right" id="removed">-87</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
Promote a bunch of util functions to instance methods of the appropriate class
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a
href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk">trunk</a>/<a
href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api">as2api</a></span><br />
<div class="fileheader"><big><b>doc_comment.rb</b></big> <small id="info"><a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb?rev=225&amp;content-type=text/vnd.viewcvs-markup">225</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb.diff?r1=225&amp;r2=226">-&gt;</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/doc_comment.rb?rev=226&amp;content-type=text/vnd.viewcvs-markup">226</a></small></div>
<pre class="diff"><small id="info">--- trunk/as2api/doc_comment.rb        2005-08-13 17:05:21 UTC (rev 225)
+++ trunk/as2api/doc_comment.rb        2005-08-13 17:28:50 UTC (rev 226)
@@ -19,6 +19,69 @@
</small></pre><pre class="diff" id="context">   def [](i)
     @blocks[i]
   end
</pre><pre class="diff" id="added">+
+  def each_block_of_type(type)
+    each_block do |block|
+      yield block if block.is_a?(type)
+    end
+  end
+
+  def has_blocktype?(type)
+    each_block_of_type(type) do |block|
+      return true
+    end
+    return false
+  end
+
+  def has_params?
+    has_blocktype?(ParamBlockTag)
+  end
+
+  def has_exceptions?
+    has_blocktype?(ThrowsBlockTag)
+  end
+
+  def has_seealso?
+    has_blocktype?(SeeBlockTag)
+  end
+
+  def has_return?
+    has_blocktype?(ReturnBlockTag)
+  end
+
+  # Does the method comment include any info in addition to any basic
+  # description block?
+  def has_method_additional_info?
+    has_params? || has_return? || has_exceptions? || has_seealso?
+  end
+
+  # Does the field comment include any info in addition to any basic description
+  # block?
+  def has_field_additional_info?
+    has_seealso?
+  end
+
+  def each_exception
+    each_block_of_type(ThrowsBlockTag) {|block| yield block }
+  end
+
+  def each_seealso
+    each_block_of_type(SeeBlockTag) {|block| yield block }
+  end
+
+  def find_param(param_name)
+    each_block_of_type(ParamBlockTag) do |block|
+      return block if block.param_name == param_name
+    end
+    return nil
+  end
+
+  def find_return
+    each_block_of_type(ReturnBlockTag) do |block|
+      return block
+    end
+    return nil
+  end
</pre><pre class="diff" id="context"> end
 
 class OurDocCommentHandler &lt; ActionScript::Parse::DocCommentHandler
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a
href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk">trunk</a>/<a
href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api">as2api</a></span><br />
<div class="fileheader"><big><b>html_output.rb</b></big> <small id="info"><a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb?rev=225&amp;content-type=text/vnd.viewcvs-markup">225</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb.diff?r1=225&amp;r2=226">-&gt;</a> <a href="http://svn.badgers-in-foil.co.uk/viewcvs.cgi/as2api/trunk/as2api/html_output.rb?rev=226&amp;content-type=text/vnd.viewcvs-markup">226</a></small></div>
<pre class="diff"><small id="info">--- trunk/as2api/html_output.rb        2005-08-13 17:05:21 UTC (rev 225)
+++ trunk/as2api/html_output.rb        2005-08-13 17:28:50 UTC (rev 226)
@@ -560,10 +560,10 @@
</small></pre><pre class="diff" id="context">           html_p do
             output_doccomment_blocktag(comment_data[0])
           end
</pre><pre class="diff" id="removed">-          if comment_has_seealso?(comment_data)
</pre><pre class="diff" id="added">+          if comment_data.has_seealso?
</pre><pre class="diff" id="context">             html_h4("See Also")
             html_ul("class"=&gt;"extra_info") do
</pre><pre class="diff" id="removed">-              comment_each_seealso(comment_data) do |see_comment|
</pre><pre class="diff" id="added">+              comment_data.each_seealso do |see_comment|
</pre><pre class="diff" id="context">                 html_li do
                   output_doccomment_blocktag(see_comment)
                 end
</pre><pre class="diff"><small id="info">@@ -756,8 +756,8 @@
</small></pre><pre class="diff" id="context">         html_div("class"=&gt;"field_info") do
           comment_data = field.comment
           output_doccomment_blocktag(comment_data[0])
</pre><pre class="diff" id="removed">-          if comment_has_field_additional_info?(comment_data)
-            if comment_has_seealso?(comment_data)
</pre><pre class="diff" id="added">+          if comment_data.has_field_additional_info?
+            if comment_data.has_seealso?
</pre><pre class="diff" id="context">               document_seealso(comment_data)
             end
           end
</pre><pre class="diff"><small id="info">@@ -795,17 +795,17 @@
</small></pre><pre class="diff" id="context">             # TODO: assumes that params named in docs match formal arguments
             #       should really filter out those that don't match before this
             #       test
</pre><pre class="diff" id="removed">-            if comment_has_params?(comment_data)
</pre><pre class="diff" id="added">+            if comment_data.has_params?
</pre><pre class="diff" id="context">               document_parameters(method.arguments, comment_data)
             end
</pre><pre class="diff" id="removed">-            if comment_has_return?(comment_data)
</pre><pre class="diff" id="added">+            if comment_data.has_return?
</pre><pre class="diff" id="context">               document_return(comment_data)
             end
</pre><pre class="diff" id="removed">-            if comment_has_exceptions?(comment_data)
</pre><pre class="diff" id="added">+            if comment_data.has_exceptions?
</pre><pre class="diff" id="context">               document_exceptions(comment_data)
             end
             method_info_from_supertype(method)
</pre><pre class="diff" id="removed">-            if comment_has_seealso?(comment_data)
</pre><pre class="diff" id="added">+            if comment_data.has_seealso?
</pre><pre class="diff" id="context">               document_seealso(comment_data)
             end
           end
</pre><pre class="diff"><small id="info">@@ -881,7 +881,7 @@
</small></pre><pre class="diff" id="context">     html_h4("Parameters")
     html_table("class"=&gt;"arguments extra_info", "summary"=&gt;"") do
       arguments.each do |arg|
</pre><pre class="diff" id="removed">-        desc = comment_find_param(comment_data, arg.name)
</pre><pre class="diff" id="added">+        desc = comment_data.find_param(arg.name)
</pre><pre class="diff" id="context">         if desc
           html_tr do
             html_td do
</pre><pre class="diff"><small id="info">@@ -898,7 +898,7 @@
</small></pre><pre class="diff" id="context"> 
   def document_return(comment_data)
     html_h4("Return")
</pre><pre class="diff" id="removed">-    return_comment = comment_find_return(comment_data)
</pre><pre class="diff" id="added">+    return_comment = comment_data.find_return
</pre><pre class="diff" id="context">     html_p("class"=&gt;"extra_info") do
       output_doccomment_blocktag(return_comment)
     end
</pre><pre class="diff"><small id="info">@@ -907,7 +907,7 @@
</small></pre><pre class="diff" id="context">   def document_exceptions(comment_data)
     html_h4("Throws")
     html_table("class"=&gt;"exceptions extra_info", "summary"=&gt;"") do
</pre><pre class="diff" id="removed">-      comment_each_exception(comment_data) do |exception_comment|
</pre><pre class="diff" id="added">+      comment_data.each_exception do |exception_comment|
</pre><pre class="diff" id="context">         html_tr do
           html_td do
             link_type_proxy(exception_comment.exception_type)
</pre><pre class="diff"><small id="info">@@ -923,7 +923,7 @@
</small></pre><pre class="diff" id="context">   def document_seealso(comment_data)
     html_h4("See Also")
     html_ul("class"=&gt;"extra_info") do
</pre><pre class="diff" id="removed">-      comment_each_seealso(comment_data) do |see_comment|
</pre><pre class="diff" id="added">+      comment_data.each_seealso do |see_comment|
</pre><pre class="diff" id="context">         html_li do
           output_doccomment_blocktag(see_comment)
         end
</pre><pre class="diff"><small id="info">@@ -955,7 +955,7 @@
</small></pre><pre class="diff" id="context">     else
       spec_method = nil
     end
</pre><pre class="diff" id="removed">-    return comment_has_method_additional_info?(comment_data) || !spec_method.nil?
</pre><pre class="diff" id="added">+    return comment_data.has_method_additional_info? || !spec_method.nil?
</pre><pre class="diff" id="context">   end
 
   def method_synopsis(method)
</pre><pre class="diff"><small id="info">@@ -1040,80 +1040,6 @@
</small></pre><pre class="diff" id="context">     end
   end
 
</pre><pre class="diff" id="removed">-
-  # TODO: All these comment_*() methods obviously want to belong to some new
-  #       class, as yet unwritten.
-
-  def comment_each_block_of_type(comment_data, type)
-    comment_data.each_block do |block|
-      yield block if block.is_a?(type)
-    end
-  end
-
-  def comment_has_blocktype?(comment_data, type)
-    comment_each_block_of_type(comment_data, type) do |block|
-      return true
-    end
-    return false
-  end
-
-  def comment_has_params?(comment_data)
-    return comment_has_blocktype?(comment_data, ParamBlockTag)
-  end
-
-  def comment_has_exceptions?(comment_data)
-    return comment_has_blocktype?(comment_data, ThrowsBlockTag)
-  end
-
-  def comment_has_seealso?(comment_data)
-    return comment_has_blocktype?(comment_data, SeeBlockTag)
-  end
-
-  def comment_has_return?(comment_data)
-    return comment_has_blocktype?(comment_data, ReturnBlockTag)
-  end
-
-  # Does the method comment include any info in addition to any basic
-  # description block?
-  def comment_has_method_additional_info?(comment_data)
-    return comment_has_params?(comment_data) ||
-           comment_has_return?(comment_data) ||
-           comment_has_exceptions?(comment_data) ||
-           comment_has_seealso?(comment_data)
-  end
-
-  # Does the field comment include any info in addition to any basic description
-  # block?
-  def comment_has_field_additional_info?(comment_data)
-    return comment_has_seealso?(comment_data)
-  end
-
-  def comment_each_exception(comment_data)
-    comment_data.each_block do |block|
-      yield block if block.is_a?(ThrowsBlockTag)
-    end
-  end
-
-  def comment_each_seealso(comment_data)
-    comment_each_block_of_type(comment_data, SeeBlockTag) do |block|
-      yield block
-    end
-  end
-
-  def comment_find_param(comment_data, param_name)
-    comment_each_block_of_type(comment_data, ParamBlockTag) do |block|
-      return block if block.param_name == param_name
-    end
-    return nil
-  end
-
-  def comment_find_return(comment_data)
-    comment_each_block_of_type(comment_data, ReturnBlockTag) do |block|
-      return block
-    end
-    return nil
-  end
-
</pre><pre class="diff" id="context"> end
 
 
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.11</small></center>
</body></html>