method
params
v1_8_7_72 -
Show latest stable
-
0 notes -
Class: Generators::HtmlMethod
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
params()
public
Hide source
# 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