add_method(method)
public
Adds method if not already there. If it is (as method or
attribute), updates the comment if it was empty.
Show source
def add_method method
return method unless @document_self
key = method.pretty_name
known = @methods_hash[key]
if known then
known.comment = method.comment if known.comment.empty?
else
@methods_hash[key] = method
method.visibility = @visibility
add_to @method_list, method
resolve_aliases method
end
method
end