Method: RDoc::Context#add_section
- Defined in:
- lib/rdoc/code_object/context.rb
#add_section(title, comment = nil) ⇒ Object
Returns a section with title
, creating it if it doesn’t already exist. comment
will be appended to the section’s comment.
A section with a title
of nil
will return the default section.
See also RDoc::Context::Section
586 587 588 589 590 591 592 593 594 595 |
# File 'lib/rdoc/code_object/context.rb', line 586 def add_section title, comment = nil if section = @sections[title] then section.add_comment comment if comment else section = Section.new self, title, comment @sections[title] = section end section end |