File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
templates/default/tags/html Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,16 @@ module Foo; end
4949 . not_to raise_error
5050 end
5151 end
52+
53+ describe "option tags on non-methods" do
54+ it "does not display @option tags on non-method objects" do
55+ YARD . parse_string <<-'eof'
56+ # @option opts name [#to_s] ('bar') the name
57+ module Foo; end
58+ eof
59+
60+ expect { Registry . at ( 'Foo' ) . format ( html_options ) }
61+ . not_to raise_error
62+ end
63+ end
5264end
Original file line number Diff line number Diff line change 1- <% if object.has_tag?(:option) %>
1+ <% if object.has_tag?(:option) && object.respond_to?(:parameters) %>
22 <% object.parameters.each do |param, default| %>
33 <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+|:$/, '') } %>
44 <% next if tags.empty? %>
You can’t perform that action at this time.
0 commit comments