APIdock / Ruby
/
method

params

ruby latest stable - Class: Generators ::HtmlMethod

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

params()
public

No documentation available.

# File lib/rdoc/generators/html_generator.rb, line 1000
 def params
 # params coming from a call-seq in 'C' will start with the
 # method name
 p = @context.params
 if p !~ /^\w/
 p = @context.params.gsub(/\s*\#.*/, '')
 p = p.tr("\n", " ").squeeze(" ")
 p = "(" + p + ")" unless p[0] == ?(
 
 if (block = @context.block_params)
 # If this method has explicit block parameters, remove any
 # explicit &block
 p.sub!(/,?\s*&\w+/, '')
 block.gsub!(/\s*\#.*/, '')
 block = block.tr("\n", " ").squeeze(" ")
 if block[0] == ?(
 block.sub!(/^\(/, '').sub!(/\)/, '')
 end
 p << " {|#{block.strip}| ...}"
 end
 end
 CGI.escapeHTML(p)
 end

AltStyle によって変換されたページ (->オリジナル) /