Method: RDoc::AnyMethod#decl

Defined in:
lib/erbook/rdoc.rb

#declObject

Returns a complete method declaration with block parameters and all.



102
103
104
105
106
107
108
109
110
111
# File 'lib/erbook/rdoc.rb', line 102

def decl
  a = params.dup

  if b = block_params
    a.sub! %r/\s*\#.*(?=.$)/, '' # remove "# :yields: ..." string
    a << " {|#{b}| ... }"
  end

  full_name << a
end