lib/rtf/information.rb
def to_s(indent=0)
         prefix = indent > 0 ? ' ' * indent : ''
         text   = StringIO.new

         text << "#{prefix}Information"
         text << "\n#{prefix}   Title:    #{@title}"    unless @title.nil?
         text << "\n#{prefix}   Author:   #{@author}"   unless @author.nil?
         text << "\n#{prefix}   Company:  #{@company}"  unless @company.nil?
         text << "\n#{prefix}   Comments: #{@comments}" unless @comments.nil?
         text << "\n#{prefix}   Created:  #{@created}"  unless @created.nil?

         text.string
      end
def to_s(indent=0)
         prefix = indent > 0 ? ' ' * indent : ''
         text   = StringIO.new

         text << "#{prefix}Information"
         text << "\n#{prefix}   Title:    #{@title}"    unless @title.nil?
         text << "\n#{prefix}   Author:   #{@author}"   unless @author.nil?
         text << "\n#{prefix}   Company:  #{@company}"  unless @company.nil?
         text << "\n#{prefix}   Comments: #{@comments}" unless @comments.nil?
         text << "\n#{prefix}   Created:  #{@created}"  unless @created.nil?

         text.string
      end
def to_s ( indent = 0 ) prefix = indent > 0 ? ' ' * indent : '' text = StringIO . new text << "#{prefix}Information" text << "\n#{prefix}   Title:    #{@title}" unless @title . nil? text << "\n#{prefix}   Author:   #{@author}" unless @author . nil? text << "\n#{prefix}   Company:  #{@company}" unless @company . nil? text << "\n#{prefix}   Comments: #{@comments}" unless @comments . nil? text << "\n#{prefix}   Created:  #{@created}" unless @created . nil? text . string end
This method creates a textual description for an Information object.

 ==== Parameters
 indent::  The number of spaces to prefix to the lines generated by the
           method. Defaults to zero.
This method creates a textual description for an Information object .