AnyMethod is the base class for objects representing methods
# File rdoc/code_objects.rb, line 650
def <=>(other)
@name <=> other.name
end
# File rdoc/code_objects.rb, line 682
def add_alias(method)
@aliases << method
end
# File rdoc/code_objects.rb, line 660
def param_seq
p = params.gsub(/\s*\#.*/, '')
p = p.tr("\n", " ").squeeze(" ")
p = "(" + p + ")" unless p[0] == (
if (block = block_params)
# If this method has explicit block parameters, remove any
# explicit &block
$stderr.puts p
p.sub!(/,?\s*&\w+/)
$stderr.puts p
block.gsub!(/\s*\#.*/, '')
block = block.tr("\n", " ").squeeze(" ")
if block[0] == (
block.sub!(/^\(/, '').sub!(/\)/, '')
end
p << " {|#{block}| ...}"
end
p
end
Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.
If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.