[BioRuby] Bioruby HTML output

Pjotr Prins pjotr.public14 at thebird.nl
Tue Jan 19 10:50:56 UTC 2010


Based on Tomoaki's comments I propose the following:

The requirements are:

  A- input objects that know about HTML should generate that
  B- other input files get escapeHTML(object.to_s)

For a container/displayer to recognize object A, object A should have
a method to_html:

  class ObjectA 
    def to_html
    end
  end

If to_html does not exist to_s is called - and escaped. The principle
will go into a mixin for the container class.

Everyone OK with this? 

Pj.



More information about the BioRuby mailing list