summaryrefslogtreecommitdiff
path: root/lib/rdoc/any_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/any_method.rb')
-rw-r--r--lib/rdoc/any_method.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/rdoc/any_method.rb b/lib/rdoc/any_method.rb
index 051f946a10..465c4a4fb2 100644
--- a/lib/rdoc/any_method.rb
+++ b/lib/rdoc/any_method.rb
@@ -116,6 +116,13 @@ class RDoc::AnyMethod < RDoc::MethodAttr
end
##
+ # Whether the method has a call-seq.
+
+ def has_call_seq?
+ !!(@call_seq || is_alias_for&._call_seq)
+ end
+
+ ##
# Loads is_alias_for from the internal name. Returns nil if the alias
# cannot be found.
@@ -297,6 +304,14 @@ class RDoc::AnyMethod < RDoc::MethodAttr
end
##
+ # Whether to skip the method description, true for methods that have
+ # aliases with a call-seq that doesn't include the method name.
+
+ def skip_description?
+ has_call_seq? && call_seq.nil? && !!(is_alias_for || !aliases.empty?)
+ end
+
+ ##
# Sets the store for this method and its referenced code objects.
def store= store