html-table 1.6.3 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/{CHANGES.rdoc → CHANGES.md} +76 -68
  4. data/Gemfile +2 -0
  5. data/MANIFEST.md +57 -0
  6. data/{README.rdoc → README.md} +80 -71
  7. data/Rakefile +122 -146
  8. data/doc/attributes.md +160 -0
  9. data/doc/table.md +173 -0
  10. data/doc/table_body.md +9 -0
  11. data/doc/table_caption.md +10 -0
  12. data/doc/table_colgroup.md +8 -0
  13. data/doc/table_colgroup_col.md +7 -0
  14. data/doc/table_content.md +17 -0
  15. data/doc/table_foot.md +8 -0
  16. data/doc/table_head.md +10 -0
  17. data/doc/table_row.md +114 -0
  18. data/doc/table_row_data.md +100 -0
  19. data/doc/table_row_header.md +6 -0
  20. data/examples/simple1.rb +7 -5
  21. data/html-table.gemspec +16 -11
  22. data/lib/html/body.rb +9 -7
  23. data/lib/html/caption.rb +4 -2
  24. data/lib/html/col.rb +37 -34
  25. data/lib/html/colgroup.rb +90 -97
  26. data/lib/html/content.rb +3 -6
  27. data/lib/html/data.rb +3 -1
  28. data/lib/html/foot.rb +53 -45
  29. data/lib/html/head.rb +54 -47
  30. data/lib/html/header.rb +5 -3
  31. data/lib/html/mixin/attribute_handler.rb +59 -55
  32. data/lib/html/mixin/html_handler.rb +33 -35
  33. data/lib/html/mixin/strongtyping.rb +6 -6
  34. data/lib/html/mixin/tag_handler.rb +6 -2
  35. data/lib/html/row.rb +156 -183
  36. data/lib/html/table.rb +45 -45
  37. data/lib/html/tablesection.rb +51 -46
  38. data/spec/attribute_handler_spec.rb +374 -0
  39. data/spec/body_spec.rb +98 -0
  40. data/spec/caption_spec.rb +83 -0
  41. data/spec/colgroup_col_spec.rb +34 -0
  42. data/spec/colgroup_spec.rb +97 -0
  43. data/spec/data_spec.rb +88 -0
  44. data/spec/foot_spec.rb +116 -0
  45. data/spec/head_spec.rb +116 -0
  46. data/spec/header_spec.rb +85 -0
  47. data/spec/html_handler_spec.rb +35 -0
  48. data/spec/row_spec.rb +163 -0
  49. data/spec/table_spec.rb +186 -0
  50. data/spec/tablesection_spec.rb +36 -0
  51. data/spec/tag_handler_spec.rb +85 -0
  52. data.tar.gz.sig +0 -0
  53. metadata +118 -92
  54. metadata.gz.sig +0 -0
  55. data/MANIFEST.rdoc +0 -56
  56. data/doc/attributes.rdoc +0 -143
  57. data/doc/table.rdoc +0 -156
  58. data/doc/table_body.rdoc +0 -9
  59. data/doc/table_caption.rdoc +0 -9
  60. data/doc/table_colgroup.rdoc +0 -8
  61. data/doc/table_colgroup_col.rdoc +0 -9
  62. data/doc/table_content.rdoc +0 -15
  63. data/doc/table_foot.rdoc +0 -8
  64. data/doc/table_head.rdoc +0 -11
  65. data/doc/table_row.rdoc +0 -105
  66. data/doc/table_row_data.rdoc +0 -92
  67. data/doc/table_row_header.rdoc +0 -7
  68. data/test/test_attribute_handler.rb +0 -361
  69. data/test/test_body.rb +0 -87
  70. data/test/test_caption.rb +0 -80
  71. data/test/test_col.rb +0 -40
  72. data/test/test_colgroup.rb +0 -89
  73. data/test/test_data.rb +0 -77
  74. data/test/test_foot.rb +0 -111
  75. data/test/test_head.rb +0 -104
  76. data/test/test_header.rb +0 -77
  77. data/test/test_html_handler.rb +0 -37
  78. data/test/test_row.rb +0 -141
  79. data/test/test_table.rb +0 -159
  80. data/test/test_tablesection.rb +0 -42
  81. data/test/test_tag_handler.rb +0 -90
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
36
  WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date:
38
+ date: 2025-06-20 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: structured_warnings
@@ -43,16 +43,30 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.3.0
46
+ version: 0.4.0
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 0.3.0
53
+ version: 0.4.0
54
54
  - !ruby/object:Gem::Dependency
55
- name: test-unit
55
+ name: rspec
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.9'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.9'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rake
56
70
  requirement: !ruby/object:Gem::Requirement
57
71
  requirements:
58
72
  - - ">="
@@ -66,7 +80,21 @@ dependencies:
66
80
  - !ruby/object:Gem::Version
67
81
  version: '0'
68
82
  - !ruby/object:Gem::Dependency
69
- name: rake
83
+ name: rubocop
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop-rspec
70
98
  requirement: !ruby/object:Gem::Requirement
71
99
  requirements:
72
100
  - - ">="
@@ -87,96 +115,94 @@ email: djberg96@gmail.com
87
115
  executables: []
88
116
  extensions: []
89
117
  extra_rdoc_files:
90
- - README.rdoc
91
- - CHANGES.rdoc
92
- - doc/table_colgroup_col.rdoc
93
- - doc/table_colgroup.rdoc
94
- - doc/table_row.rdoc
95
- - doc/table_head.rdoc
96
- - doc/attributes.rdoc
97
- - doc/table_row_data.rdoc
98
- - doc/table_body.rdoc
99
- - doc/table_caption.rdoc
100
- - doc/table_foot.rdoc
101
- - doc/table.rdoc
102
- - doc/table_row_header.rdoc
103
- - doc/table_content.rdoc
118
+ - README.md
119
+ - CHANGES.md
120
+ - MANIFEST.md
121
+ - doc/attributes.md
122
+ - doc/table.md
123
+ - doc/table_body.md
124
+ - doc/table_caption.md
125
+ - doc/table_colgroup.md
126
+ - doc/table_colgroup_col.md
127
+ - doc/table_content.md
128
+ - doc/table_foot.md
129
+ - doc/table_head.md
130
+ - doc/table_row.md
131
+ - doc/table_row_data.md
132
+ - doc/table_row_header.md
104
133
  files:
105
- - html-table.gemspec
134
+ - CHANGES.md
135
+ - Gemfile
106
136
  - LICENSE
107
- - test
108
- - test/test_col.rb
109
- - test/test_colgroup.rb
110
- - test/test_data.rb
111
- - test/test_caption.rb
112
- - test/test_header.rb
113
- - test/test_head.rb
114
- - test/test_row.rb
115
- - test/test_attribute_handler.rb
116
- - test/test_table.rb
117
- - test/test_foot.rb
118
- - test/test_html_handler.rb
119
- - test/test_tablesection.rb
120
- - test/test_tag_handler.rb
121
- - test/test_body.rb
137
+ - MANIFEST.md
138
+ - README.md
122
139
  - Rakefile
123
- - certs
124
140
  - certs/djberg96_pub.pem
125
- - examples
126
- - examples/simple3.rb
141
+ - doc/attributes.md
142
+ - doc/table.md
143
+ - doc/table_body.md
144
+ - doc/table_caption.md
145
+ - doc/table_colgroup.md
146
+ - doc/table_colgroup_col.md
147
+ - doc/table_content.md
148
+ - doc/table_foot.md
149
+ - doc/table_head.md
150
+ - doc/table_row.md
151
+ - doc/table_row_data.md
152
+ - doc/table_row_header.md
153
+ - examples/advanced.rb
127
154
  - examples/intermediate1.rb
128
- - examples/simple2.rb
155
+ - examples/intermediate2.rb
129
156
  - examples/intermediate3.rb
130
157
  - examples/simple1.rb
131
- - examples/intermediate2.rb
132
- - examples/advanced.rb
133
- - lib
134
- - lib/html
135
- - lib/html/tablesection.rb
136
- - lib/html/data.rb
137
- - lib/html/table.rb
138
- - lib/html/row.rb
158
+ - examples/simple2.rb
159
+ - examples/simple3.rb
160
+ - html-table.gemspec
161
+ - lib/html-table.rb
162
+ - lib/html/body.rb
163
+ - lib/html/caption.rb
139
164
  - lib/html/col.rb
140
- - lib/html/head.rb
141
165
  - lib/html/colgroup.rb
142
- - lib/html/mixin
166
+ - lib/html/content.rb
167
+ - lib/html/data.rb
168
+ - lib/html/foot.rb
169
+ - lib/html/head.rb
170
+ - lib/html/header.rb
143
171
  - lib/html/mixin/attribute_handler.rb
144
172
  - lib/html/mixin/html_handler.rb
145
173
  - lib/html/mixin/strongtyping.rb
146
174
  - lib/html/mixin/tag_handler.rb
147
- - lib/html/caption.rb
148
- - lib/html/content.rb
149
- - lib/html/foot.rb
150
- - lib/html/body.rb
151
- - lib/html/header.rb
152
- - lib/html-table.rb
153
- - CHANGES.rdoc
154
- - doc
155
- - doc/table_colgroup_col.rdoc
156
- - doc/table_colgroup.rdoc
157
- - doc/table_row.rdoc
158
- - doc/table_head.rdoc
159
- - doc/attributes.rdoc
160
- - doc/table_row_data.rdoc
161
- - doc/table_body.rdoc
162
- - doc/table_caption.rdoc
163
- - doc/table_foot.rdoc
164
- - doc/table.rdoc
165
- - doc/table_row_header.rdoc
166
- - doc/table_content.rdoc
167
- - MANIFEST.rdoc
168
- - README.rdoc
175
+ - lib/html/row.rb
176
+ - lib/html/table.rb
177
+ - lib/html/tablesection.rb
178
+ - spec/attribute_handler_spec.rb
179
+ - spec/body_spec.rb
180
+ - spec/caption_spec.rb
181
+ - spec/colgroup_col_spec.rb
182
+ - spec/colgroup_spec.rb
183
+ - spec/data_spec.rb
184
+ - spec/foot_spec.rb
185
+ - spec/head_spec.rb
186
+ - spec/header_spec.rb
187
+ - spec/html_handler_spec.rb
188
+ - spec/row_spec.rb
189
+ - spec/table_spec.rb
190
+ - spec/tablesection_spec.rb
191
+ - spec/tag_handler_spec.rb
169
192
  homepage: http://github.com/djberg96/html-table
170
193
  licenses:
171
194
  - Apache-2.0
172
195
  metadata:
173
196
  homepage_uri: https://github.com/djberg96/html-table
174
197
  bug_tracker_uri: https://github.com/djberg96/html-table/issues
175
- changelog_uri: https://github.com/djberg96/html-table/blob/master/CHANGES
176
- documentation_uri: https://github.com/djberg96/html-table/wiki
198
+ changelog_uri: https://github.com/djberg96/html-table/blob/main/CHANGES.md
199
+ documentation_uri: https://djberg96.github.io/html-table
177
200
  source_code_uri: https://github.com/djberg96/html-table
178
201
  wiki_uri: https://github.com/djberg96/html-table/wiki
179
- post_install_message:
202
+ rubygems_mfa_required: 'true'
203
+ github_repo: https://github.com/djberg96/html-table
204
+ funding_uri: https://github.com/sponsors/djberg96
205
+ post_install_message:
180
206
  rdoc_options: []
181
207
  require_paths:
182
208
  - lib
@@ -191,22 +217,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
217
  - !ruby/object:Gem::Version
192
218
  version: '0'
193
219
  requirements: []
194
- rubygems_version: 3.0.6
195
- signing_key:
220
+ rubygems_version: 3.5.22
221
+ signing_key:
196
222
  specification_version: 4
197
223
  summary: A Ruby interface for generating HTML tables
198
224
  test_files:
199
- - test/test_col.rb
200
- - test/test_colgroup.rb
201
- - test/test_data.rb
202
- - test/test_caption.rb
203
- - test/test_header.rb
204
- - test/test_head.rb
205
- - test/test_row.rb
206
- - test/test_attribute_handler.rb
207
- - test/test_table.rb
208
- - test/test_foot.rb
209
- - test/test_html_handler.rb
210
- - test/test_tablesection.rb
211
- - test/test_tag_handler.rb
212
- - test/test_body.rb
225
+ - spec/attribute_handler_spec.rb
226
+ - spec/body_spec.rb
227
+ - spec/caption_spec.rb
228
+ - spec/colgroup_col_spec.rb
229
+ - spec/colgroup_spec.rb
230
+ - spec/data_spec.rb
231
+ - spec/foot_spec.rb
232
+ - spec/head_spec.rb
233
+ - spec/header_spec.rb
234
+ - spec/html_handler_spec.rb
235
+ - spec/row_spec.rb
236
+ - spec/table_spec.rb
237
+ - spec/tablesection_spec.rb
238
+ - spec/tag_handler_spec.rb
metadata.gz.sig CHANGED
Binary file
data/MANIFEST.rdoc DELETED
@@ -1,56 +0,0 @@
1
- * CHANGES
2
- * LICENSE
3
- * MANIFEST
4
- * README
5
- * Rakefile
6
- * html-table.gemspec
7
- * certs/djberg96_pub.pem
8
- * doc/attributes.rdoc
9
- * doc/table_body.rdoc
10
- * doc/table_caption.rdoc
11
- * doc/table_content.rdoc
12
- * doc/table_colgroup.rdoc
13
- * doc/table_colgroup_col.rdoc
14
- * doc/table_foot.rdoc
15
- * doc/table_head.rdoc
16
- * doc/table_row_data.rdoc
17
- * doc/table_row_header.rdoc
18
- * doc/table_row.rdoc
19
- * doc/table.rdoc
20
- * doc/examples/advanced.rb
21
- * doc/examples/intermediate1.rb
22
- * doc/examples/intermediate2.rb
23
- * doc/examples/intermediate3.rb
24
- * doc/examples/simple1.rb
25
- * doc/examples/simple2.rb
26
- * doc/examples/simple3.rb
27
- * lib/html-table.rb
28
- * lib/strongtyping.rb
29
- * lib/html/attribute_handler.rb
30
- * lib/html/body.rb
31
- * lib/html/caption.rb
32
- * lib/html/col.rb
33
- * lib/html/colgroup.rb
34
- * lib/html/content.rb
35
- * lib/html/data.rb
36
- * lib/html/foot.rb
37
- * lib/html/head.rb
38
- * lib/html/header.rb
39
- * lib/html/html_handler.rb
40
- * lib/html/row.rb
41
- * lib/html/table.rb
42
- * lib/html/tablesection.rb
43
- * lib/html/tag_handler.rb
44
- * test/test_attribute_handler.rb
45
- * test/test_body.rb
46
- * test/test_caption.rb
47
- * test/test_col.rb
48
- * test/test_colgroup.rb
49
- * test/test_data.rb
50
- * test/test_head.rb
51
- * test/test_header.rb
52
- * test/test_html_handler.rb
53
- * test/test_row.rb
54
- * test/test_table.rb
55
- * test/test_tablesection.rb
56
- * test/test_tag_handler.rb
data/doc/attributes.rdoc DELETED
@@ -1,143 +0,0 @@
1
- == Description
2
- A list of attributes handled by html-table. Each of the writers has a
3
- corresponding reader unless otherwise stated.
4
-
5
- == Attributes
6
- abbr=(string)
7
- Sets the value for the abbr attribute.
8
-
9
- align=(string)
10
- Sets the align attribute. Valid arguments are 'left', 'center' and
11
- 'right'. An ArgumentError is raised if an invalid argument is passed.
12
-
13
- axis=(string)
14
- Sets the value for the axis attribute.
15
-
16
- background=(url)
17
- Sets the background attribute. The url must be a String or a TypeError
18
- is raised. This is a non-standard extension.
19
-
20
- bgcolor=(color)
21
- Sets the color for the bgcolor attribute. Hex values should still be
22
- quoted, e.g. "#F80000".
23
-
24
- border=(num)
25
- Sets the value for the border attribute.
26
-
27
- bordercolor=(color)
28
- Sets the color for the bordercolor attribute. This is a non-standard
29
- extension.
30
-
31
- bordercolordark=(color)
32
- Sets the color for the bordercolordark attribute. This is a non-standard
33
- extension.
34
-
35
- bordercolorlight=(color)
36
- Sets the color for the bordercolorlight attribute. This is a non-standard
37
- extension.
38
-
39
- cellpadding=(num)
40
- Sets the value for the cellpadding attribute. Raises an ArgumentError if
41
- num.to_i is less than 0.
42
-
43
- cellspacing=(num)
44
- Sets the value for the cellspacing attribute. Raises an ArgumentError if
45
- num.to_i is less than 0.
46
-
47
- char=(character)
48
- Sets the value for the char attribute. An ArgumentError is raised if the
49
- argument passed has a length greater than 1 (i.e. it may only be a char).
50
-
51
- charoff=(value)
52
- Sets the value for the charoff attribute.
53
-
54
- colspan=(num)
55
- Sets the colspan attribute.
56
-
57
- content=(*args)
58
- The behavior of this method varies largely based on the type of instance
59
- that invokes it. Here are the rules for each +arg+ in +args+:
60
-
61
- +Table+:
62
-
63
- If +arg+ is a Row, Head, Foot, Body or ColGroup object, it is
64
- pushed onto the table. If +arg+ is a string, one Row object with
65
- one one Data object is pushed onto the Table. If +arg+ is an Array,
66
- one Row object is created and each element of the array is pushed
67
- onto that Row.
68
-
69
- +Table::Row+:
70
-
71
- If +arg+ is a Header or Data object, it is pushed onto the Row. If
72
- +arg+ is a String, it is created as a single Data object. Attempts
73
- to assign any other type will raise a TypeError.
74
-
75
- +Table::Head, Table::Foot, Table::Body+:
76
-
77
- Behave identically to Table::Row except that they accept Table::Row
78
- objects as well.
79
-
80
- +Table::ColGroup+:
81
-
82
- Behaves identically to Table::Row except that it only accepts Col objects.
83
-
84
- +Table::Col+:
85
-
86
- This method is undefined for Table::Col, because they do not accept
87
- content.
88
-
89
- +Table::Data and Table::Header+:
90
-
91
- Sets the text string for the Data or Header object. Arrays are join'd.
92
- Any other type raises a TypeError.
93
-
94
- frame=(type)
95
- Sets the value for the frame attribute. Valid values are border, void,
96
- above, below, hsides, lhs, rhs, vsides, and box. An ArgumentError is
97
- raised if an invalid type is detected.
98
-
99
- height=(num)
100
- Sets the value for the height attribute. Raises an ArgumentError if
101
- num.to_i is less than 0.
102
-
103
- hspace=(num)
104
- Sets the value for the hspace attribute. Raises an ArgumentError if
105
- num.to_i is less than 0.
106
-
107
- nowrap=(bool)
108
- Sets the value for the nowrap attribute. Setting it to true means it will
109
- be included as an attribute for the Table object. The default is false
110
- (i.e. not included).
111
-
112
- rowspan=(num)
113
- Sets the value for the rowspan attribute.
114
-
115
- rules=(edges)
116
- Sets the value for the rules attribute. Valid values are all, groups,
117
- rows, cols, or none. An ArgumentError is raised if an invalid edges value
118
- is detected.
119
-
120
- scope=(scope)
121
- Sets the value for the scope attribute. Valid values for +scope+ are
122
- row, col, rowgroup or colgroup. An ArgumentError is raised if an invalid
123
- scope value is passed.
124
-
125
- span=(num)
126
- Sets the span attribute. If num.to_i is less than 0, and ArgumentError
127
- is raised.
128
-
129
- summary=(string)
130
- Sets the value for the summary attribute.
131
-
132
- valign=(position)
133
- Sets the value for the valign attribute. Valid values are top, center,
134
- bottom, and baseline. This is a non-standard extension.
135
-
136
- vspace=(num)
137
- Sets the value for the vspace attribute. This is a non-standard
138
- extension.
139
-
140
- width=(num)
141
- Sets the value for the width attribute. If num is in 'x%' format, it
142
- is retained as a string. If num is a Fixnum (or stringified number), an
143
- ArgumentError is raised if num.to_i is less than 0.
data/doc/table.rdoc DELETED
@@ -1,156 +0,0 @@
1
- == Description
2
- An interface for generating HTML Tables with Ruby.
3
-
4
- == Synopsis
5
- require "html/table"
6
- include HTML
7
-
8
- table = HTML::Table.new{ |t|
9
- t.border = 1
10
- t.bgcolor = "red"
11
- }
12
-
13
- table.push Table::Row.new{ |r|
14
- r.align = "left"
15
- r.bgcolor = "green"
16
- r.content = ["foo","bar","baz"]
17
- }
18
-
19
- row = Table::Row.new{ |r|
20
- r.align = "right"
21
- r.bgcolor = "blue"
22
- r.content = "hello world"
23
- }
24
-
25
- table[1] = row
26
-
27
- puts table.html
28
-
29
- #### output ####
30
- <table border=1 bgcolor='red'>
31
- <tr align='left' bgcolor='green'> # row 0
32
- <td>foo</td> # column 0
33
- <td>bar</td> # column 1
34
- <td>baz</td> # column 2
35
- </tr>
36
- <tr align='right' bgcolor='blue'> # row 1
37
- <td>hello world</td> # column 0
38
- </tr>
39
- </table>
40
-
41
- See the 'examples' directory for more examples.
42
-
43
- == Mixins
44
- Table is a subclass of Array, and therefore mixes in Enumerable. The
45
- push, unshift and []= methods have been modified. See below for details.
46
-
47
- Table also mixes in the AttributeHandler module which provides methods
48
- for adding attributes to each of the tag types. See attributes.rdoc for
49
- more details.
50
-
51
- == Constants
52
- VERSION
53
- The current version number (a String). This serves as the VERSION number
54
- for the entire html-table package.
55
-
56
- == Class Methods
57
- Table.new(arg=nil)
58
- Table.new(arg=nil){ |t| ... }
59
- Creates a new Table instance. You can set attributes for the Table by
60
- passing a block.
61
-
62
- If +arg+ is supplied, it is automatically interpreted to be content. This
63
- is a shortcut for Table.new{ |t| t.content = '...' }.
64
-
65
- Table.global_end_tags?
66
- Returns the value of the global_end_tags class variable. By default,
67
- this is true.
68
-
69
- Table.global_end_tags=(true|false)
70
- Sets the global_end_tags class variable. This determines class-wide, for
71
- those classes where end tags are optional, whether or not end tags are
72
- included in the final html. Classes where end tags are not optional are
73
- not affected.
74
-
75
- If set to false, this overrides individual class end tags settings.
76
-
77
- == Instance Methods
78
- Table#[]=(index, object)
79
- Assigns +object+ to +index+. There are restrictions to the data
80
- types that you can assign to a Table instance. They include Caption,
81
- ColGroup, Body, Foot, Head and Row. You cannot assign a slice (yet).
82
-
83
- Table#configure(row_num, col_num=0){ |td_object| block }
84
- Configures column +col_num+ at row +row_num+, using a block to set
85
- options. If only +row_num+ is specified, then you'll be configuring
86
- only the row. Generally speaking, that means you'll be configure a
87
- Table::Row and not a Data or Header object.
88
-
89
- Table#content
90
- Returns the HTML content.
91
-
92
- Table#content=(arg)
93
- Adds data to the Table. The +arg+ may be a Table::Row object, an
94
- Array of Table::Row objects, an Array of Array's, an Array of Strings,
95
- or a single String. In the last two cases, a single Table::Row with a
96
- single Table::Row::Data object is created, with the string as the content.
97
-
98
- Table#html
99
- Returns the entire HTML content for the Table Object. This is what you
100
- want to print when you're done creating your Table.
101
-
102
- Table#push(obj)
103
- Pushes +obj+ onto the Table, where +obj+ must be a Row, Caption,
104
- ColGroup, Body, Foot or Head object. Also note that the Caption and Head
105
- objects will automatically put themselves at row 0 (or possibly 1, in the
106
- case of a Head object where a Caption already exists).
107
-
108
- Table#unshift(obj)
109
- Unshifts +obj+ onto the Table. The same rules apply to unshift as
110
- they do to push.
111
-
112
- == Notes
113
- A Table consists of Table::Row, Table::Caption, Table::ColGroup,
114
- Table::Body, Table::Foot, Table::Head and Table::Row objects. Table::Row
115
- objects in turn consist of Table::Row::Data and Table::Row::Header
116
- objects. Table::ColGroup objects consist of Table::ColGroup::Col
117
- objects. Table::Head, Table::Body and Table::Foot objects consist
118
- of Table::Row objects.
119
-
120
- String attributes are quoted. Numeric attributes are not.
121
-
122
- Some attributes have type checking. Some check for valid arguments. In
123
- the latter case, it is case-insensitive. See the documentation on
124
- specific methods for more details.
125
-
126
- Using a non-standard extension (e.g. "background") will send a warning to
127
- STDERR in $VERBOSE (-w) mode.
128
-
129
- == Known Bugs
130
- None that I'm aware of. Please report bugs on the project page at
131
- http://www.rubyforge.org/projects/shards.
132
-
133
- == Future Plans
134
- Allow standard html tags to be added to elements as appropriate, such
135
- as <B>, <I>, etc.
136
-
137
- CSS support.
138
-
139
- == Acknowledgements
140
- Anthony Peacock, for giving me ideas with his HTML::Table Perl module.
141
- Holden Glova and Culley Harrelson for API suggestions and comments.
142
-
143
- == License
144
- Apache-2.0
145
-
146
- == Copyright
147
- (C) 2003-2019 Daniel J. Berger
148
- All Rights Reserved
149
-
150
- == Warranty
151
- This package is provided "as is" and without any express or
152
- implied warranties, including, without limitation, the implied
153
- warranties of merchantability and fitness for a particular purpose.
154
-
155
- == Author
156
- Daniel J. Berger
data/doc/table_body.rdoc DELETED
@@ -1,9 +0,0 @@
1
- == Description
2
- A Table::Body object represents a single <TBODY></TBODY> instance for an
3
- HTML Table.
4
- == Notes
5
- In virtually every respect the Table::Body class is identical to
6
- the Table or Table::Row class. Unlike Table::Foot or Table::Head, there
7
- can be more than one instance (i.e. it's not a singleton class).
8
-
9
- A Table::Body contains Table::Row objects.
@@ -1,9 +0,0 @@
1
- == Description
2
- A Table::Caption object represents a single <CAPTION></CAPTION> instance
3
- for an HTML Table.
4
- == Notes
5
- The Table::Caption class is virtually identical to the Table::Row::Data
6
- class. There is one important behavioral difference, however. First,
7
- there can only be one Table::Caption. If you attempt to add a second one,
8
- it will merely overwrite the existing one. Second, a Table::Caption is
9
- always bumped to index 0.
@@ -1,8 +0,0 @@
1
- == Description
2
- A Table::ColGroup object represents a single <COLGROUP></COLGROUP>
3
- instance for an HTML Table.
4
-
5
- == Notes
6
- In virtually every respect the Table::ColGroup class is identical to the
7
- Table::Row class. The only difference, beyond the begin and end tags, is
8
- that a ColGroup may only contain instances of the Col class.
@@ -1,9 +0,0 @@
1
- == Description
2
- A Table::ColGroup::Col object represents a single <COL> instance for an
3
- HTML Table.
4
-
5
- == Notes
6
- In virtually every respect the Table::ColGroup::Col class is identical to
7
- the Table::Row::Data class. The only differences are that a
8
- Table::ColGroup::Col instance does not contain any content, nor does it
9
- include an end tag.