Class: RDoc::AnyMethod
- Inherits:
-
Object
- Object
- RDoc::AnyMethod
- Defined in:
- lib/erbook/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.
116 117 118 |
# File 'lib/erbook/rdoc.rb', line 116 def comment_html DummyMarkup.new.markup comment end |
#decl ⇒ Object
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 |
#full_name ⇒ Object
Returns the fully qualified name of this method.
95 96 97 |
# File 'lib/erbook/rdoc.rb', line 95 def full_name [parent.full_name, name].join(singleton ? '::' : '#') end |
#top_level ⇒ Object
Returns the RDoc::TopLevel object which contains this method.
123 124 125 126 127 128 129 130 131 |
# File 'lib/erbook/rdoc.rb', line 123 def top_level n = parent while n && n.parent n = n.parent end n end |