Skip to content

Commit

Permalink
Remove RDoc specific markup for auto-generated meta-tags.
Browse files Browse the repository at this point in the history
Closes gh-45
  • Loading branch information
lsegal committed Dec 1, 2009
1 parent b99219d commit e22e365
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/yard/handlers/ruby/attribute_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ def process
if type == :write
src = "def #{meth}(value)"
full_src = "#{src}\n @#{name} = value\nend"
doc = "Sets the attribute +#{name}+\n@param value the value to set the attribute +#{name}+ to."
doc = "Sets the attribute #{name}\n@param value the value to set the attribute #{name} to."
else
src = "def #{meth}"
full_src = "#{src}\n @#{name}\nend"
doc = "Returns the value of attribute +#{name}+"
doc = "Returns the value of attribute #{name}"
end
o.source ||= full_src
o.signature ||= src
Expand Down
4 changes: 2 additions & 2 deletions lib/yard/handlers/ruby/legacy/attribute_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ def process
if type == :write
src = "def #{meth}(value)"
full_src = "#{src}\n @#{name} = value\nend"
doc = "Sets the attribute +#{name}+\n@param value the value to set the attribute +#{name}+ to."
doc = "Sets the attribute #{name}\n@param value the value to set the attribute #{name} to."
else
src = "def #{meth}"
full_src = "#{src}\n @#{name}\nend"
doc = "Returns the value of attribute +#{name}+"
doc = "Returns the value of attribute #{name}"
end
o.source ||= full_src
o.signature ||= src
Expand Down
2 changes: 1 addition & 1 deletion lib/yard/handlers/ruby/legacy/method_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def process
if mscope == :instance && meth == "initialize"
unless obj.has_tag?(:return)
obj.docstring.add_tag(YARD::Tags::Tag.new(:return,
"a new instance of +#{namespace.name}+", namespace.name.to_s))
"a new instance of #{namespace.name}", namespace.name.to_s))
end
elsif mscope == :class && obj.docstring.blank? && %w(inherited included
extended method_added method_removed method_undefined).include?(meth)
Expand Down
2 changes: 1 addition & 1 deletion lib/yard/handlers/ruby/method_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def process
if mscope == :instance && meth == "initialize"
unless obj.has_tag?(:return)
obj.docstring.add_tag(YARD::Tags::Tag.new(:return,
"a new instance of +#{namespace.name}+", namespace.name.to_s))
"a new instance of #{namespace.name}", namespace.name.to_s))
end
elsif mscope == :class && obj.docstring.blank? && %w(inherited included
extended method_added method_removed method_undefined).include?(meth)
Expand Down
2 changes: 1 addition & 1 deletion spec/handlers/method_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

meth.should have_tag(:return)
meth.tag(:return).types.should == ["Foo"]
meth.tag(:return).text.should == "a new instance of +Foo+"
meth.tag(:return).text.should == "a new instance of Foo"
end

%w(inherited included method_added method_removed method_undefined).each do |meth|
Expand Down
2 changes: 1 addition & 1 deletion spec/templates/examples/class001.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h3>Returns:</h3>


&mdash;
a new instance of +A+
a new instance of A

</li>

Expand Down
8 changes: 4 additions & 4 deletions spec/templates/examples/module001.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h2>Attribute Summary</h2>



<span class="summary_desc">Returns the value of attribute +attr1+.</span>
<span class="summary_desc">Returns the value of attribute attr1.</span>

</li>

Expand All @@ -98,7 +98,7 @@ <h2>Attribute Summary</h2>



<span class="summary_desc">Returns the value of attribute +attr2+.</span>
<span class="summary_desc">Returns the value of attribute attr2.</span>

</li>

Expand Down Expand Up @@ -167,7 +167,7 @@ <h2>Attribute Details</h2>

</p><div class="docstring">
<div class="discussion">
Returns the value of attribute +attr1+
Returns the value of attribute attr1

</div>
</div>
Expand Down Expand Up @@ -206,7 +206,7 @@ <h2>Attribute Details</h2>

</p><div class="docstring">
<div class="discussion">
Returns the value of attribute +attr2+
Returns the value of attribute attr2

</div>
</div>
Expand Down

0 comments on commit e22e365

Please sign in to comment.