class RDoc::Context::Section
def ==(other)
def ==(other) self.class === other and @sequence == other.sequence end
def initialize(parent, title, comment)
def initialize(parent, title, comment) @parent = parent @title = title @@sequence.succ! @sequence = @@sequence.dup set_comment comment end
def inspect # :nodoc:
def inspect # :nodoc: "#<%s:0x%x %s %p>" % [ self.class, object_id, @sequence, title ] end
def set_comment(comment)
def set_comment(comment) return unless comment if comment =~ /^#[ \t]*:section:.*\n/ then start = $` rest = $' if start.empty? @comment = rest else @comment = rest.sub(/#{start.chomp}\Z/, '') end else @comment = comment end @comment = nil if @comment.empty? end