Class: UnformattedContentContainer

Inherits:
Container
  • Object
show all
Defined in:
lib/ribit/contentparser.rb

Instance Method Summary collapse

Methods inherited from Container

#<<, #add_child, #childs?, #get_childs, #get_parent, #replace, #set_childs, #text?

Methods included from Assert

assert, #assert, assert_nil, #assert_nil, #assert_not_nil, assert_not_nil, raise_exception

Constructor Details

#initializeUnformattedContentContainer

Returns a new instance of UnformattedContentContainer.



944
945
946
947
948
# File 'lib/ribit/contentparser.rb', line 944

def initialize
  super( nil )
  # other parsers shouldn't modify text of this container => pass false
  add_child( TextContainer.new( '', false ) )
end

Instance Method Details

#to_sObject



951
952
953
954
955
# File 'lib/ribit/contentparser.rb', line 951

def to_s
  text = super
  
  return '<pre>' + text + '</pre>'
end