Method: RDoc::Markup::Document#<<

Defined in:
lib/rdoc/markup/document.rb

#<<(part) ⇒ Object

Appends part to the document



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/rdoc/markup/document.rb', line 40

def << part
  case part
  when RDoc::Markup::Document then
    unless part.empty? then
      parts.concat part.parts
      parts << RDoc::Markup::BlankLine.new
    end
  when String then
    raise ArgumentError,
          "expected RDoc::Markup::Document and friends, got String" unless
      part.empty?
  else
    parts << part
  end
end