lib/yard/handlers/ruby/legacy/method_handler.rb in yard-0.5.4 vs lib/yard/handlers/ruby/legacy/method_handler.rb in yard-0.5.5

- old
+ new

@@ -40,9 +40,20 @@ elsif obj.tag(:return).nil? obj.docstring.add_tag(YARD::Tags::Tag.new(:return, "", "Boolean")) end end + if obj.has_tag?(:option) + # create the options parameter if its missing + obj.tags(:option).each do |option| + expected_param = option.name + unless obj.tags(:param).find {|x| x.name == expected_param } + new_tag = YARD::Tags::Tag.new(:param, "a customizable set of options", "Hash", expected_param) + obj.docstring.add_tag(new_tag) + end + end + end + if info = obj.attr_info if meth.to_s =~ /=$/ # writer info[:write] = obj if info[:read] else info[:read] = obj if info[:write]