html-table 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +10 -1
- data/MANIFEST +2 -1
- data/README +22 -27
- data/Rakefile +24 -0
- data/doc/table.rdoc +23 -22
- data/lib/html/attribute_handler.rb +30 -2
- data/lib/html/html_handler.rb +2 -2
- data/lib/html/table.rb +1 -1
- data/lib/html/tag_handler.rb +10 -1
- data/test/tc_table.rb +1 -1
- metadata +94 -74
data/CHANGES
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
+
== 1.3.1 - 8-Feb-2008
|
2
|
+
* Fully qualified the HTML::Table class in the HTMLHandler module. This fix
|
3
|
+
eliminates the need to 'include HTML' to actually some code to work
|
4
|
+
properly. Thanks go to Jos Backus for the spot and patch.
|
5
|
+
* Added a Rakefile with tasks for testing and installation.
|
6
|
+
* Removed the install.rb file. That's now handled by the Rakefile.
|
7
|
+
* Cleaned up some warnings in the AttributeHandler and TagHandler modules.
|
8
|
+
* Updated the MANIFEST and README files.
|
9
|
+
|
1
10
|
== 1.3.0 - 2-Aug-2006
|
2
|
-
* Added support for
|
11
|
+
* Added support for DSI style syntax, i.e. the ability to omit the explicit
|
3
12
|
receiver in block form.
|
4
13
|
* The content method now creates a Table::Content object behind the scenes
|
5
14
|
(a subclass of String) and allows physical tags to generated on the fly
|
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -6,18 +6,13 @@
|
|
6
6
|
* StrongTyping 2.0.6b or later
|
7
7
|
|
8
8
|
== Installation
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
ruby test/ts_all.rb (optional)
|
14
|
-
ruby html-table.gemspec
|
15
|
-
gem install html-table-<version>.gem
|
16
|
-
=== Gem Installation, Remote
|
17
|
-
gem install html-table
|
9
|
+
rake test (optional)
|
10
|
+
rake install OR rake gem_install
|
11
|
+
|
12
|
+
Just do 'gem install html-table' for remote installation.
|
18
13
|
|
19
14
|
== Synopsis
|
20
|
-
require
|
15
|
+
require 'html/table'
|
21
16
|
include HTML
|
22
17
|
|
23
18
|
# Explicit syntax
|
@@ -63,11 +58,11 @@
|
|
63
58
|
See the 'examples' directory under 'doc' for more examples.
|
64
59
|
|
65
60
|
== Mixins
|
66
|
-
Table is a subclass of Array, and therefore mixes in Enumerable.
|
67
|
-
push, unshift and []= methods have been modified.
|
61
|
+
Table is a subclass of Array, and therefore mixes in Enumerable. The
|
62
|
+
push, unshift and []= methods have been modified. See below for details.
|
68
63
|
|
69
|
-
Table also mixes in
|
70
|
-
attributes to each of the tag types.
|
64
|
+
Table also mixes in AttributeHandler which provides methods for adding
|
65
|
+
attributes to each of the tag types. See attributes.rdoc for more details.
|
71
66
|
|
72
67
|
== Notes
|
73
68
|
A Table consists of Table::Row, Table::Caption, Table::ColGroup,
|
@@ -82,18 +77,18 @@
|
|
82
77
|
Table::Head, Table::Body and Table::Foot objects consist
|
83
78
|
of Table::Row objects.
|
84
79
|
|
85
|
-
String attributes are quoted.
|
80
|
+
String attributes are quoted. Numeric attributes are not.
|
86
81
|
|
87
|
-
Some attributes have type checking.
|
88
|
-
the latter case, it is case-insensitive.
|
82
|
+
Some attributes have type checking. Some check for valid arguments. In
|
83
|
+
the latter case, it is case-insensitive. See the documentation on
|
89
84
|
specific methods for more details.
|
90
85
|
|
91
86
|
Using a non-standard extension (e.g. "background") will send a warning to
|
92
87
|
STDERR in $VERBOSE (-w) mode.
|
93
88
|
|
94
89
|
== Known Bugs
|
95
|
-
None that I'm aware of.
|
96
|
-
http://
|
90
|
+
None that I'm aware of. Please report bugs on the project page at
|
91
|
+
http://www.rubyforge.org/projects/shards
|
97
92
|
|
98
93
|
== Future Plans
|
99
94
|
Documentation improvements (include inline links to other files).
|
@@ -110,7 +105,7 @@
|
|
110
105
|
Ruby's
|
111
106
|
|
112
107
|
== Copyright
|
113
|
-
(C) 2003-
|
108
|
+
(C) 2003-2008 Daniel J. Berger
|
114
109
|
All Rights Reserved
|
115
110
|
|
116
111
|
== Warranty
|
@@ -125,20 +120,20 @@
|
|
125
120
|
|
126
121
|
== Developer's Notes
|
127
122
|
Some people might be a little annoyed with the fact that I required Ryan
|
128
|
-
Pavlik's strongtyping
|
123
|
+
Pavlik's strongtyping library. I'm not a big fan of strong typing myself. So,
|
129
124
|
why did I do this?
|
130
125
|
|
131
126
|
Normally when creating code, you setup your own rules as far as what is allowed
|
132
|
-
as an argument.
|
127
|
+
as an argument. You publish the API, set up a good set of tests, and don't
|
133
128
|
bother worrying about types because you figure people can read the API and
|
134
|
-
won't go out of their way to break it.
|
129
|
+
won't go out of their way to break it. You certainly don't worry about it
|
135
130
|
yourself because you're used to dynamic languages and find that you don't need
|
136
131
|
the strong typing training wheels after all (right?).
|
137
132
|
|
138
133
|
However, HTML tables have a predefined set of rules as far as what content is
|
139
|
-
valid, and where it's placed in order to be HTML 4.0 compliant.
|
134
|
+
valid, and where it's placed in order to be HTML 4.0 compliant. For example,
|
140
135
|
if a caption is included, it should be at the 'top' of your table syntax, you
|
141
|
-
can only have one foot section, and so on.
|
142
|
-
conventions and/or rules in Ruby via Ryan's module.
|
143
|
-
without it, and instead chose to do a plethora of "kind_of?" checks.
|
136
|
+
can only have one foot section, and so on. So, I chose to enforce these
|
137
|
+
conventions and/or rules in Ruby via Ryan's module. I could have lived
|
138
|
+
without it, and instead chose to do a plethora of "kind_of?" checks. However,
|
144
139
|
Ryan's package is both faster and required less typing on my part.
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
desc "Install the html-table package (non-gem)"
|
5
|
+
task :install do
|
6
|
+
dest = File.join(Config::CONFIG['sitelibdir'], 'html')
|
7
|
+
Dir.mkdir(dest) unless File.exists? dest
|
8
|
+
Dir['lib/html/*.rb'].each{ |f|
|
9
|
+
cp f, dest, :verbose => true
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Install the html-table package as a gem"
|
14
|
+
task :install_gem do
|
15
|
+
ruby 'html-table.gemspec'
|
16
|
+
file = Dir["*.gem"].first
|
17
|
+
sh "gem install #{file}"
|
18
|
+
end
|
19
|
+
|
20
|
+
Rake::TestTask.new do |t|
|
21
|
+
t.libs << 'lib'
|
22
|
+
t.warning = true
|
23
|
+
t.test_files = FileList['test/tc*']
|
24
|
+
end
|
data/doc/table.rdoc
CHANGED
@@ -41,15 +41,16 @@
|
|
41
41
|
See the 'examples' directory for more examples.
|
42
42
|
|
43
43
|
== Mixins
|
44
|
-
Table is a
|
45
|
-
push, unshift and []= methods have been modified.
|
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
46
|
|
47
|
-
Table also mixes in
|
48
|
-
attributes to each of the tag types.
|
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.
|
49
50
|
|
50
51
|
== Constants
|
51
52
|
VERSION
|
52
|
-
The current version number (a String).
|
53
|
+
The current version number (a String). This serves as the VERSION number
|
53
54
|
for the entire html-table package.
|
54
55
|
|
55
56
|
== Class Methods
|
@@ -66,9 +67,9 @@ Table.global_end_tags?
|
|
66
67
|
this is true.
|
67
68
|
|
68
69
|
Table.global_end_tags=(true|false)
|
69
|
-
Sets the global_end_tags class variable.
|
70
|
+
Sets the global_end_tags class variable. This determines class-wide, for
|
70
71
|
those classes where end tags are optional, whether or not end tags are
|
71
|
-
included in the final html.
|
72
|
+
included in the final html. Classes where end tags are not optional are
|
72
73
|
not affected.
|
73
74
|
|
74
75
|
If set to false, this overrides individual class end tags settings.
|
@@ -76,12 +77,12 @@ Table.global_end_tags=(true|false)
|
|
76
77
|
== Instance Methods
|
77
78
|
Table#[]=(index, object)
|
78
79
|
Assigns +object+ to +index+. There are restrictions to the data
|
79
|
-
types that you can assign to a Table instance.
|
80
|
-
ColGroup, Body, Foot, Head and Row.
|
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).
|
81
82
|
|
82
83
|
Table#configure(row_num, col_num=0){ |td_object| block }
|
83
84
|
Configures column +col_num+ at row +row_num+, using a block to set
|
84
|
-
options.
|
85
|
+
options. If only +row_num+ is specified, then you'll be configuring
|
85
86
|
only the row. Generally speaking, that means you'll be configure a
|
86
87
|
Table::Row and not a Data or Header object.
|
87
88
|
|
@@ -95,38 +96,38 @@ Table#content=(arg)
|
|
95
96
|
single Table::Row::Data object is created, with the string as the content.
|
96
97
|
|
97
98
|
Table#html
|
98
|
-
Returns the entire HTML content for the Table Object.
|
99
|
+
Returns the entire HTML content for the Table Object. This is what you
|
99
100
|
want to print when you're done creating your Table.
|
100
101
|
|
101
102
|
Table#push(obj)
|
102
103
|
Pushes +obj+ onto the Table, where +obj+ must be a Row, Caption,
|
103
|
-
ColGroup, Body, Foot or Head object.
|
104
|
+
ColGroup, Body, Foot or Head object. Also note that the Caption and Head
|
104
105
|
objects will automatically put themselves at row 0 (or possibly 1, in the
|
105
106
|
case of a Head object where a Caption already exists).
|
106
107
|
|
107
108
|
Table#unshift(obj)
|
108
|
-
Unshifts +obj+ onto the Table.
|
109
|
+
Unshifts +obj+ onto the Table. The same rules apply to unshift as
|
109
110
|
they do to push.
|
110
111
|
|
111
112
|
== Notes
|
112
113
|
A Table consists of Table::Row, Table::Caption, Table::ColGroup,
|
113
|
-
Table::Body, Table::Foot, Table::Head and Table::Row objects.
|
114
|
+
Table::Body, Table::Foot, Table::Head and Table::Row objects. Table::Row
|
114
115
|
objects in turn consist of Table::Row::Data and Table::Row::Header
|
115
|
-
objects.
|
116
|
-
objects.
|
116
|
+
objects. Table::ColGroup objects consist of Table::ColGroup::Col
|
117
|
+
objects. Table::Head, Table::Body and Table::Foot objects consist
|
117
118
|
of Table::Row objects.
|
118
119
|
|
119
|
-
String attributes are quoted.
|
120
|
+
String attributes are quoted. Numeric attributes are not.
|
120
121
|
|
121
|
-
Some attributes have type checking.
|
122
|
-
the latter case, it is case-insensitive.
|
122
|
+
Some attributes have type checking. Some check for valid arguments. In
|
123
|
+
the latter case, it is case-insensitive. See the documentation on
|
123
124
|
specific methods for more details.
|
124
125
|
|
125
126
|
Using a non-standard extension (e.g. "background") will send a warning to
|
126
127
|
STDERR in $VERBOSE (-w) mode.
|
127
128
|
|
128
129
|
== Known Bugs
|
129
|
-
None that I'm aware of.
|
130
|
+
None that I'm aware of. Please report bugs on the project page at
|
130
131
|
http://www.rubyforge.org/projects/shards.
|
131
132
|
|
132
133
|
== Future Plans
|
@@ -143,7 +144,7 @@ Table#unshift(obj)
|
|
143
144
|
Ruby's
|
144
145
|
|
145
146
|
== Copyright
|
146
|
-
(C) 2003-
|
147
|
+
(C) 2003-2008 Daniel J. Berger
|
147
148
|
All Rights Reserved
|
148
149
|
|
149
150
|
== Warranty
|
@@ -153,5 +154,5 @@ Table#unshift(obj)
|
|
153
154
|
|
154
155
|
== Author
|
155
156
|
Daniel J. Berger
|
156
|
-
djberg96 at
|
157
|
+
djberg96 at nospam at gmail dot com
|
157
158
|
imperator on IRC (irc.freenode.net)
|
@@ -2,10 +2,11 @@
|
|
2
2
|
# with HTML tables. In some cases validation is done on the setters.
|
3
3
|
#--
|
4
4
|
# The seemingly redundant writer methods were left here for backwards
|
5
|
-
# compatibility and for those who may not prefer the
|
5
|
+
# compatibility and for those who may not prefer the DSI.
|
6
6
|
#
|
7
7
|
module AttributeHandler
|
8
8
|
def abbr(string = nil)
|
9
|
+
@abbr ||= nil
|
9
10
|
self.abbr = string if string
|
10
11
|
@abbr
|
11
12
|
end
|
@@ -16,6 +17,7 @@ module AttributeHandler
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def align(position = nil)
|
20
|
+
@align ||= nil
|
19
21
|
self.align = position if position
|
20
22
|
@align
|
21
23
|
end
|
@@ -28,6 +30,7 @@ module AttributeHandler
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def axis(string = nil)
|
33
|
+
@axis ||= nil
|
31
34
|
self.axis = string if string
|
32
35
|
@axis
|
33
36
|
end
|
@@ -38,6 +41,7 @@ module AttributeHandler
|
|
38
41
|
end
|
39
42
|
|
40
43
|
def background(url = nil)
|
44
|
+
@background ||= nil
|
41
45
|
self.background = url if url
|
42
46
|
@background
|
43
47
|
end
|
@@ -53,6 +57,7 @@ module AttributeHandler
|
|
53
57
|
end
|
54
58
|
|
55
59
|
def bgcolor(color = nil)
|
60
|
+
@bgcolor ||= nil
|
56
61
|
self.bgcolor = color if color
|
57
62
|
@bgcolor
|
58
63
|
end
|
@@ -63,6 +68,7 @@ module AttributeHandler
|
|
63
68
|
end
|
64
69
|
|
65
70
|
def border(num = nil)
|
71
|
+
@border ||= nil
|
66
72
|
self.border = num if num
|
67
73
|
@border
|
68
74
|
end
|
@@ -80,6 +86,7 @@ module AttributeHandler
|
|
80
86
|
end
|
81
87
|
|
82
88
|
def bordercolor(color = nil)
|
89
|
+
@bordercolor ||= nil
|
83
90
|
self.bordercolor = color if color
|
84
91
|
@bordercolor
|
85
92
|
end
|
@@ -94,6 +101,7 @@ module AttributeHandler
|
|
94
101
|
end
|
95
102
|
|
96
103
|
def bordercolordark(color = nil)
|
104
|
+
@bordercolordark ||= nil
|
97
105
|
self.bordercolordark = color if color
|
98
106
|
@bordercolordark
|
99
107
|
end
|
@@ -108,6 +116,7 @@ module AttributeHandler
|
|
108
116
|
end
|
109
117
|
|
110
118
|
def bordercolorlight(color = nil)
|
119
|
+
@bordercolorlight ||= nil
|
111
120
|
self.bordercolorlight = color if color
|
112
121
|
@bordercolorlight
|
113
122
|
end
|
@@ -122,6 +131,7 @@ module AttributeHandler
|
|
122
131
|
end
|
123
132
|
|
124
133
|
def cellpadding(num = nil)
|
134
|
+
@cellpadding ||= nil
|
125
135
|
self.cellpadding = num if num
|
126
136
|
@cellpadding
|
127
137
|
end
|
@@ -133,6 +143,7 @@ module AttributeHandler
|
|
133
143
|
end
|
134
144
|
|
135
145
|
def cellspacing(num = nil)
|
146
|
+
@cellspacing ||= nil
|
136
147
|
self.cellspacing = num if num
|
137
148
|
@cellspacing
|
138
149
|
end
|
@@ -144,6 +155,7 @@ module AttributeHandler
|
|
144
155
|
end
|
145
156
|
|
146
157
|
def char(character = nil)
|
158
|
+
@char ||= nil
|
147
159
|
self.char = character if character
|
148
160
|
@char
|
149
161
|
end
|
@@ -155,6 +167,7 @@ module AttributeHandler
|
|
155
167
|
end
|
156
168
|
|
157
169
|
def charoff(offset = nil)
|
170
|
+
@charoff ||= nil
|
158
171
|
self.charoff = offset if offset
|
159
172
|
@charoff
|
160
173
|
end
|
@@ -165,10 +178,11 @@ module AttributeHandler
|
|
165
178
|
modify_html("charoff", offset)
|
166
179
|
end
|
167
180
|
|
168
|
-
# Returns the CSS class.
|
181
|
+
# Returns the CSS class. The trailing underscore is necessary in order
|
169
182
|
# to avoid conflict with the 'class' keyword.
|
170
183
|
#
|
171
184
|
def class_(klass = nil)
|
185
|
+
@class ||= nil
|
172
186
|
self.class_ = klass if klass
|
173
187
|
@class
|
174
188
|
end
|
@@ -182,6 +196,7 @@ module AttributeHandler
|
|
182
196
|
end
|
183
197
|
|
184
198
|
def col(num = nil)
|
199
|
+
@col ||= nil
|
185
200
|
self.col = num if num
|
186
201
|
@col
|
187
202
|
end
|
@@ -193,6 +208,7 @@ module AttributeHandler
|
|
193
208
|
end
|
194
209
|
|
195
210
|
def colspan(span = nil)
|
211
|
+
@colspan ||= nil
|
196
212
|
self.colspan = span if span
|
197
213
|
@colspan
|
198
214
|
end
|
@@ -243,6 +259,7 @@ module AttributeHandler
|
|
243
259
|
alias data content
|
244
260
|
|
245
261
|
def frame(type = nil)
|
262
|
+
@frame ||= nil
|
246
263
|
self.frame = type if type
|
247
264
|
@frame
|
248
265
|
end
|
@@ -255,6 +272,7 @@ module AttributeHandler
|
|
255
272
|
end
|
256
273
|
|
257
274
|
def height(num = nil)
|
275
|
+
@height ||= nil
|
258
276
|
self.height = num if num
|
259
277
|
@height
|
260
278
|
end
|
@@ -266,6 +284,7 @@ module AttributeHandler
|
|
266
284
|
end
|
267
285
|
|
268
286
|
def hspace(num = nil)
|
287
|
+
@hspace ||= nil
|
269
288
|
self.hspace = num if num
|
270
289
|
@hspace
|
271
290
|
end
|
@@ -277,6 +296,7 @@ module AttributeHandler
|
|
277
296
|
end
|
278
297
|
|
279
298
|
def nowrap(bool = nil)
|
299
|
+
@nowrap ||= nil
|
280
300
|
self.nowrap = bool if bool
|
281
301
|
@nowrap
|
282
302
|
end
|
@@ -290,6 +310,7 @@ module AttributeHandler
|
|
290
310
|
end
|
291
311
|
|
292
312
|
def rowspan(num = nil)
|
313
|
+
@rowspan ||= nil
|
293
314
|
self.rowspan = num if num
|
294
315
|
@rowspan
|
295
316
|
end
|
@@ -301,6 +322,7 @@ module AttributeHandler
|
|
301
322
|
end
|
302
323
|
|
303
324
|
def rules(edges = nil)
|
325
|
+
@rules ||= nil
|
304
326
|
self.rules = edges if edges
|
305
327
|
@rules
|
306
328
|
end
|
@@ -313,6 +335,7 @@ module AttributeHandler
|
|
313
335
|
end
|
314
336
|
|
315
337
|
def span(num = nil)
|
338
|
+
@span ||= nil
|
316
339
|
self.span = num if num
|
317
340
|
@span
|
318
341
|
end
|
@@ -324,6 +347,7 @@ module AttributeHandler
|
|
324
347
|
end
|
325
348
|
|
326
349
|
def style(string = nil)
|
350
|
+
@style ||= nil
|
327
351
|
self.style = string if string
|
328
352
|
@style
|
329
353
|
end
|
@@ -334,6 +358,7 @@ module AttributeHandler
|
|
334
358
|
end
|
335
359
|
|
336
360
|
def summary(string = nil)
|
361
|
+
@summary ||= nil
|
337
362
|
self.summary = string if string
|
338
363
|
@summary
|
339
364
|
end
|
@@ -344,6 +369,7 @@ module AttributeHandler
|
|
344
369
|
end
|
345
370
|
|
346
371
|
def valign(position = nil)
|
372
|
+
@valign ||= nil
|
347
373
|
self.valign = position if position
|
348
374
|
@valign
|
349
375
|
end
|
@@ -356,6 +382,7 @@ module AttributeHandler
|
|
356
382
|
end
|
357
383
|
|
358
384
|
def vspace(num = nil)
|
385
|
+
@vspace ||= nil
|
359
386
|
self.vspace = num if num
|
360
387
|
@vspace
|
361
388
|
end
|
@@ -367,6 +394,7 @@ module AttributeHandler
|
|
367
394
|
end
|
368
395
|
|
369
396
|
def width(num = nil)
|
397
|
+
@width ||= nil
|
370
398
|
self.width = num if num
|
371
399
|
@width
|
372
400
|
end
|
data/lib/html/html_handler.rb
CHANGED
@@ -74,7 +74,7 @@ module HtmlHandler
|
|
74
74
|
# preferences with regards to end tags.
|
75
75
|
#####################################################################
|
76
76
|
if self.kind_of?(Array)
|
77
|
-
if Table.global_end_tags?
|
77
|
+
if HTML::Table.global_end_tags?
|
78
78
|
if self.class.respond_to?(:end_tags?)
|
79
79
|
if formatting
|
80
80
|
if self.class.end_tags?
|
@@ -100,7 +100,7 @@ module HtmlHandler
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
else
|
103
|
-
if Table.global_end_tags?
|
103
|
+
if HTML::Table.global_end_tags?
|
104
104
|
if self.class.respond_to?(:end_tags?)
|
105
105
|
html << @html_end if self.class.end_tags?
|
106
106
|
else
|
data/lib/html/table.rb
CHANGED
data/lib/html/tag_handler.rb
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
###################################################################
|
8
8
|
module TagHandler
|
9
9
|
def bold(bool = nil)
|
10
|
+
@bold ||= nil
|
10
11
|
self.bold = bool if bool
|
11
12
|
@bold
|
12
13
|
end
|
@@ -17,6 +18,7 @@ module TagHandler
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def big(bool = nil)
|
21
|
+
@big ||= nil
|
20
22
|
self.big = bool if bool
|
21
23
|
@big
|
22
24
|
end
|
@@ -27,6 +29,7 @@ module TagHandler
|
|
27
29
|
end
|
28
30
|
|
29
31
|
def blink(bool = nil)
|
32
|
+
@blink ||= nil
|
30
33
|
self.blink = bool if bool
|
31
34
|
@blink
|
32
35
|
end
|
@@ -40,6 +43,7 @@ module TagHandler
|
|
40
43
|
end
|
41
44
|
|
42
45
|
def italic(bool = nil)
|
46
|
+
@italic ||= nil
|
43
47
|
self.italic = bool if bool
|
44
48
|
@italic
|
45
49
|
end
|
@@ -50,6 +54,7 @@ module TagHandler
|
|
50
54
|
end
|
51
55
|
|
52
56
|
def strike(bool = nil)
|
57
|
+
@strike ||= nil
|
53
58
|
self.strike = bool if bool
|
54
59
|
@strike
|
55
60
|
end
|
@@ -60,6 +65,7 @@ module TagHandler
|
|
60
65
|
end
|
61
66
|
|
62
67
|
def sub(bool = nil)
|
68
|
+
@sub ||= nil
|
63
69
|
self.sub = bool if bool
|
64
70
|
@sub
|
65
71
|
end
|
@@ -70,6 +76,7 @@ module TagHandler
|
|
70
76
|
end
|
71
77
|
|
72
78
|
def sup(bool = nil)
|
79
|
+
@sup ||= nil
|
73
80
|
self.sup = bool if bool
|
74
81
|
@sup
|
75
82
|
end
|
@@ -80,6 +87,7 @@ module TagHandler
|
|
80
87
|
end
|
81
88
|
|
82
89
|
def tt(bool = nil)
|
90
|
+
@tt ||= nil
|
83
91
|
self.tt = bool if bool
|
84
92
|
@tt
|
85
93
|
end
|
@@ -90,8 +98,9 @@ module TagHandler
|
|
90
98
|
end
|
91
99
|
|
92
100
|
def underline(bool = nil)
|
101
|
+
@underline ||= nil
|
93
102
|
self.underline = bool if bool
|
94
|
-
@
|
103
|
+
@underline
|
95
104
|
end
|
96
105
|
|
97
106
|
def underline=(bool)
|
data/test/tc_table.rb
CHANGED
metadata
CHANGED
@@ -1,103 +1,123 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.0
|
3
|
-
specification_version: 1
|
4
2
|
name: html-table
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date: 2006-08-02 00:00:00 -06:00
|
8
|
-
summary: A Ruby interface for generating HTML tables
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: djberg96@gmail.com
|
12
|
-
homepage: http://www.rubyforge.org/projects/shards
|
13
|
-
rubyforge_project:
|
14
|
-
description: A Ruby interface for generating HTML tables
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 1.3.1
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Daniel J. Berger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-02-12 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: strongtyping
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
version:
|
24
|
+
description: A Ruby interface for generating HTML tables
|
25
|
+
email: djberg96@gmail.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- README
|
32
|
+
- CHANGES
|
33
|
+
- doc/attributes.rdoc
|
34
|
+
- doc/table.rdoc
|
35
|
+
- doc/table_body.rdoc
|
36
|
+
- doc/table_caption.rdoc
|
37
|
+
- doc/table_colgroup.rdoc
|
38
|
+
- doc/table_colgroup_col.rdoc
|
39
|
+
- doc/table_content.rdoc
|
40
|
+
- doc/table_foot.rdoc
|
41
|
+
- doc/table_head.rdoc
|
42
|
+
- doc/table_row.rdoc
|
43
|
+
- doc/table_row_data.rdoc
|
44
|
+
- doc/table_row_header.rdoc
|
31
45
|
files:
|
32
|
-
- lib/html/
|
33
|
-
- lib/html/html_handler.rb
|
46
|
+
- lib/html/CVS
|
34
47
|
- lib/html/attribute_handler.rb
|
35
|
-
- lib/html/
|
36
|
-
- lib/html/
|
37
|
-
- lib/html/tag_handler.rb
|
38
|
-
- lib/html/content.rb
|
48
|
+
- lib/html/body.rb
|
49
|
+
- lib/html/caption.rb
|
39
50
|
- lib/html/col.rb
|
40
|
-
- lib/html/foot.rb
|
41
|
-
- lib/html/table.rb
|
42
51
|
- lib/html/colgroup.rb
|
52
|
+
- lib/html/content.rb
|
53
|
+
- lib/html/data.rb
|
54
|
+
- lib/html/foot.rb
|
43
55
|
- lib/html/head.rb
|
56
|
+
- lib/html/header.rb
|
57
|
+
- lib/html/html_handler.rb
|
44
58
|
- lib/html/row.rb
|
45
|
-
- lib/html/
|
46
|
-
- lib/html/
|
47
|
-
-
|
59
|
+
- lib/html/table.rb
|
60
|
+
- lib/html/tablesection.rb
|
61
|
+
- lib/html/tag_handler.rb
|
62
|
+
- CVS
|
48
63
|
- CHANGES
|
49
64
|
- MANIFEST
|
50
|
-
-
|
51
|
-
-
|
52
|
-
- test/
|
53
|
-
- test/tc_caption.rb
|
54
|
-
- test/tc_body.rb
|
65
|
+
- README
|
66
|
+
- Rakefile
|
67
|
+
- test/CVS
|
55
68
|
- test/tc_attribute_handler.rb
|
56
|
-
- test/
|
69
|
+
- test/tc_body.rb
|
70
|
+
- test/tc_caption.rb
|
57
71
|
- test/tc_col.rb
|
72
|
+
- test/tc_colgroup.rb
|
73
|
+
- test/tc_data.rb
|
74
|
+
- test/tc_foot.rb
|
75
|
+
- test/tc_head.rb
|
58
76
|
- test/tc_header.rb
|
59
|
-
- test/tc_table.rb
|
60
77
|
- test/tc_html_handler.rb
|
61
78
|
- test/tc_row.rb
|
62
|
-
- test/
|
79
|
+
- test/tc_table.rb
|
63
80
|
- test/tc_tablesection.rb
|
64
|
-
- test/
|
65
|
-
-
|
66
|
-
- doc/
|
67
|
-
- doc/table_foot.rdoc
|
68
|
-
- doc/table_colgroup.rdoc
|
69
|
-
- doc/table_content.rdoc
|
70
|
-
- doc/table_colgroup_col.rdoc
|
71
|
-
- doc/table_body.rdoc
|
72
|
-
- doc/table.rdoc
|
73
|
-
- doc/table_row.rdoc
|
74
|
-
- doc/table_row_header.rdoc
|
81
|
+
- test/tc_tag_handler.rb
|
82
|
+
- test/ts_all.rb
|
83
|
+
- doc/CVS
|
75
84
|
- doc/attributes.rdoc
|
85
|
+
- doc/table.rdoc
|
86
|
+
- doc/table_body.rdoc
|
76
87
|
- doc/table_caption.rdoc
|
77
|
-
test_files:
|
78
|
-
- test/ts_all.rb
|
79
|
-
rdoc_options: []
|
80
|
-
|
81
|
-
extra_rdoc_files:
|
82
|
-
- README
|
83
|
-
- CHANGES
|
84
|
-
- doc/table_row_data.rdoc
|
85
|
-
- doc/table_head.rdoc
|
86
|
-
- doc/table_foot.rdoc
|
87
88
|
- doc/table_colgroup.rdoc
|
88
|
-
- doc/table_content.rdoc
|
89
89
|
- doc/table_colgroup_col.rdoc
|
90
|
-
- doc/
|
91
|
-
- doc/
|
90
|
+
- doc/table_content.rdoc
|
91
|
+
- doc/table_foot.rdoc
|
92
|
+
- doc/table_head.rdoc
|
92
93
|
- doc/table_row.rdoc
|
94
|
+
- doc/table_row_data.rdoc
|
93
95
|
- doc/table_row_header.rdoc
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
extensions: []
|
96
|
+
has_rdoc: true
|
97
|
+
homepage: http://shards.rubyforge.org
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
99
100
|
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: "0"
|
108
|
+
version:
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: "0"
|
114
|
+
version:
|
100
115
|
requirements: []
|
101
116
|
|
102
|
-
|
103
|
-
|
117
|
+
rubyforge_project: http://www.rubyforge.org/projects/shards
|
118
|
+
rubygems_version: 1.0.1
|
119
|
+
signing_key:
|
120
|
+
specification_version: 2
|
121
|
+
summary: A Ruby interface for generating HTML tables
|
122
|
+
test_files:
|
123
|
+
- test/ts_all.rb
|