lib/inch/language/ruby/provider/yard/docstring.rb in inch-0.6.0.rc5 vs lib/inch/language/ruby/provider/yard/docstring.rb in inch-0.6.0.rc6

- old
+ new

@@ -33,10 +33,18 @@ describe_parameter_regexps(name).any? do |pattern| @text.index(pattern) end end + # Returns +true+ if the docstring mentions a member with the given + # +name+. + def mentions_member?(name) + mentions_parameter?(name) + end + + # Returns +true+ if the docstring mentions a parameter with the + # given +name+. def mentions_parameter?(name) return false if name.nil? mention_parameter_regexps(name).any? do |pattern| @text.index(pattern) end @@ -109,10 +117,10 @@ /\`#{expr}\`/, # `param1` /\+#{expr}\+/, # +param1+ /\+#{expr}\+\:\:/, # +param1+:: /<tt>#{expr}<\/tt>/, # <tt>param1</tt> /<tt>#{expr}<\/tt>\:\:/, # <tt>param1</tt>:: - /^#{expr}\ +\-\ / # param1 - + /^\s*#{expr}\ +\-\ / # param1 - ] end # Returns possible notations for +name+. # matches "param1" and "param1<String,nil>"