Skip to content

Commit

Permalink
Fix missing constructor section
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Oct 15, 2009
1 parent 329fa4d commit 24462a6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
3 changes: 3 additions & 0 deletions spec/templates/class_spec.rb
Expand Up @@ -14,6 +14,9 @@ class A < B
def method_missing(*args) end
def a; end
def b; end
# constructor method!
def initialize(test) end
end
eof
end
Expand Down
48 changes: 46 additions & 2 deletions spec/templates/examples/class001.html
Expand Up @@ -92,6 +92,14 @@ <h3>Version:</h3>

</li>

<li class="public">
- (Object) initialize(test)


<span class="summary_desc">constructor method!.</span>

</li>

<li class="public">
- (Object) method_missing(*args)

Expand All @@ -101,7 +109,43 @@ <h3>Version:</h3>
</li>

</ul>
<div id="method_missing_details">
<div id="constructor_details">
<h2>Constructor Details</h2>

<div class="method_details">
<p class="signature first" id="initialize-instance_method">

- (Object) initialize(test)



</p><div class="docstring">
<div class="discussion">
constructor method!

</div>
</div>
<div class="tags">

</div><table class="source_code">
<tr>
<td>
<pre class="lines">


14</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '(stdin)', line 14</span>

<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id test'>test</span><span class='rparen'>)</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>

</div>
<div id="method_missing_details">
<h2>Dynamic Method Handling</h2>
<p class="notice">
This class handles dynamic methods through the <tt>method_missing</tt> method
Expand Down Expand Up @@ -192,4 +236,4 @@ <h2>Method Details</h2>
</table>
</div>

</div>
</div>
2 changes: 1 addition & 1 deletion templates/default/class/constructor_details.html.erb
Expand Up @@ -3,6 +3,6 @@
<% if @ctor.namespace != object %>
<p class="notice">This class inherits a constructor from <%= linkify @ctor, @ctor.namespace.path %></p>
<% else %>
<% yieldall :object => @ctor, :index => 0 %>
<%= yieldall :object => @ctor, :index => 0 %>
<% end %>
</div>

0 comments on commit 24462a6

Please sign in to comment.