Raw content of EnsEMBL::Web::Document::HTML::TwoColTable
package EnsEMBL::Web::Document::HTML::TwoColTable;
use strict;
use CGI qw(escapeHTML);
sub new {
my $class = shift;
my $self = { 'content' => [] };
bless $self, $class;
return $self;
}
sub _row {
my($self, $label, $value ) = @_;
return sprintf '
%s |
%s |
', escapeHTML($label), $value;
}
sub add_row {
my($self, $label, $value) = @_;
push @{$self->{'content'}}, $self->_row( $label, $value );
}
sub render {
my $self = shift;
my $html = qq(\n);
$html .= join '',@{$self->{'content'}};
$html .= "
\n";
return $html;
}
1;