Class: RDoc::AnyMethod
- Inherits:
-
Object
- Object
- RDoc::AnyMethod
- Defined in:
- lib/gerbil/rdoc.rb
Instance Method Summary collapse
-
#comment_html ⇒ Object
Returns a HTML version of this method’s comment.
-
#decl ⇒ Object
Returns a complete method declaration with block parameters and all.
-
#full_name ⇒ Object
Returns the fully qualified name of this method.
-
#top_level ⇒ Object
Returns the RDoc::TopLevel object which contains this method.
Instance Method Details
#comment_html ⇒ Object
Returns a HTML version of this method’s comment.
94 95 96 |
# File 'lib/gerbil/rdoc.rb', line 94 def comment_html DummyMarkup.new.markup comment end |
#decl ⇒ Object
Returns a complete method declaration with block parameters and all.
84 85 86 87 88 89 90 91 |
# File 'lib/gerbil/rdoc.rb', line 84 def decl a = params.dup if b = block_params a.sub! %r/\s*\#.*(?=.$)/, '' # remove "# :yields: ..." string a << " {|#{b}| ... }" end full_name << a end |
#full_name ⇒ Object
Returns the fully qualified name of this method.
79 80 81 |
# File 'lib/gerbil/rdoc.rb', line 79 def full_name [parent.full_name, name].join(singleton ? '::' : '#') end |
#top_level ⇒ Object
Returns the RDoc::TopLevel object which contains this method.
99 100 101 102 103 104 105 |
# File 'lib/gerbil/rdoc.rb', line 99 def top_level n = parent while n && n.parent n = n.parent end n end |