>>>> David Alan Black <dblack / candle.superlink.net> wrote:

> It seems a little sideways to add these methods to Array.  I think it
> might be more logical to have the HTMLtable objects know how to
> assemble themselves.

  It does:

    HTMLtable.new(some_array)

  and

    some_array.table

  and

     table (some_array)  # Differs from HTMLtable in that it returns
                         # a string of HTML instead of a table object.

  all work.

  I guess I'm into overkill a little (which probably explains why
  one of my coworkers keeps asking "Why don't you actually finish
  a program someday?" - I spend too much time trying to cover all
  possible cases.  I just read the section on making software
  "good enough" in _The_Pragmatic_Programmer_ and I should probably
  give that some thought)


<various snippage>

> Another way: if you don't mind destroying "format", you could do:
>
>   ...
>   row.map { |c|
>     tcell(c, format.shift)
>   }
>   ...


  I like that and should have thought of it.


> (Sorry, this got longer than I'd expected.)


  Not a problem for me.

  -Dave

--
David Tillman                      |  System Administrator
dtillman / ozarkaircraftsystems.com  |  Ozark Aircraft Systems