Rubynet-announce Digest, Vol 5, Issue 3

Send rubynet-announce mailing list submissions to
rubynet-announce@lists.rubynet.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.rubynet.org/lists/listinfo/rubynet-announce
or, via email, send a message with subject or body ‘help’ to
rubynet-announce-request@lists.rubynet.org

You can reach the person managing the list at
rubynet-announce-owner@lists.rubynet.org

When replying, please edit your Subject line so it is more specific
than “Re: Contents of rubynet-announce digest…”

Today’s Topics:

  1. [ANN] html-table 0.0.3 (Daniel Berger)
···

Message: 1
Date: Tue, 08 Jul 2003 14:50:04 -0600
From: Daniel Berger djberge@qwest.com
Subject: [ruby-announce] [ANN] html-table 0.0.3
To: rubynet-announce rubynet-announce@lists.rubynet.org
Message-ID: 3F0B2E7C.8070204@qwest.com
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi all,

I’m happy to announce the release of html-table 0.0.3 (beta). This is a
very different API from what you saw in 0.0.1.

A Table is now a subclass of Array, as are most of its components, which
means that you can access rows/elements etc by index number if you wish,
as well as use any of the Array/Enumerable methods for convenience.

In addition, you can now omit end tags (where permitted) as well as
capitalize your HTML tags, for those that prefer that style.

Here’s an example (simple2.rb from the docs/examples directory). Note
that there is usually more than one way to accomplish the same output.
See the docs and examples for more details.

require "html/table"
include HTML

Table.html_case = "upper"
Table::Row.end_tags = false
Table::Row::Data.end_tags = false

table = Table.new
tr1 = Table::Row.new
tr2 = Table::Row.new
tr3 = Table::Row.new

tr1.content = “foo”, “bar”, "baz"
tr2.content = 1,2,3
tr3.content = %w/hello world/

table.push(tr1,tr2,tr3)

table[0][1].align = “left”

puts table.html

OUTPUT

foo bar baz
1 2 3
hello world

Regards,

Dan

PS - 0.0.2 was largely similar, but it’s missing the capitalization
option, plus the tarball was somewhat messed up. That’s why it was
never announced.



rubynet-announce mailing list
announce@rubynet.org
http://lists.rubynet.org/lists/listinfo/rubynet-announce

End of rubynet-announce Digest, Vol 5, Issue 3