Module SM::Flow
In: lib/ihelp.rb
Flow SM dot/m_0_2.png

Methods

to_html   to_text  

Public Instance methods

[Source]

     # File lib/ihelp.rb, line 975
975:   def to_html
976:     tag = self.class.to_s.split("::").last
977:     tag = "PRE" if tag == "VERB"
978:     xmlstr = %Q(<#{tag}>
979:       #{body if respond_to? :body}
980:       #{contents.map{|c|c.to_html} if respond_to? :content}
981:     </#{tag}>)
982:     REXML::Document.new(xmlstr)
983:   end

[Source]

     # File lib/ihelp.rb, line 960
960:   def to_text
961:     RI::TextFormatter.allocate.conv_html(
962:       if respond_to? :body
963:         body
964:       else
965:         ""
966:       end +
967:       if respond_to? :contents
968:         contents.map{|c| c.to_text }.join("\n\n")
969:       else
970:         ""
971:       end
972:     ).gsub(/<\/?..>/, '')
973:   end

[Validate]