Class: HTML::Table::TableSection
Overview
Superclass for THEAD, TBODY, TFOOT
Class Method Summary
collapse
Instance Method Summary
collapse
#html
#abbr, #abbr=, #align, #align=, #axis, #axis=, #background, #background=, #bgcolor, #bgcolor=, #border, #border=, #bordercolor, #bordercolor=, #bordercolordark, #bordercolordark=, #bordercolorlight, #bordercolorlight=, #cellpadding, #cellpadding=, #cellspacing, #cellspacing=, #char, #char=, #charoff, #charoff=, #class_, #class_=, #col, #col=, #colspan, #colspan=, #configure, #content, #frame, #frame=, #height, #height=, #hspace, #hspace=, #nowrap, #nowrap=, #rowspan, #rowspan=, #rules, #rules=, #span, #span=, #style, #style=, #summary, #summary=, #valign, #valign=, #vspace, #vspace=, #width, #width=
Constructor Details
Returns a new instance of TableSection.
8
9
10
|
# File 'lib/html/tablesection.rb', line 8
def initialize(&block)
instance_eval(&block) if block_given?
end
|
Class Method Details
.indent_level ⇒ Object
20
21
22
|
# File 'lib/html/tablesection.rb', line 20
def self.indent_level
@indent_level
end
|
.indent_level=(num) ⇒ Object
24
25
26
27
28
|
# File 'lib/html/tablesection.rb', line 24
def self.indent_level=(num)
expect(num, Integer)
raise ArgumentError, "indent_level must be >= 0" if num < 0
@indent_level = num
end
|
Instance Method Details
#[]=(index, obj) ⇒ Object
30
31
32
33
|
# File 'lib/html/tablesection.rb', line 30
def []=(index,obj)
expect(obj,Table::Row)
super
end
|
#content=(arg) ⇒ Object
Adds a Table::Row object as content. The arg
is passed as the value to the Table::Row constructor.
15
16
17
18
|
# File 'lib/html/tablesection.rb', line 15
def content=(arg)
tr = Table::Row.new(arg)
self.push(tr)
end
|
#push(*args) ⇒ Object
35
36
37
38
|
# File 'lib/html/tablesection.rb', line 35
def push(*args)
args.each{ |obj| expect(obj,Table::Row) }
super
end
|
#unshift(obj) ⇒ Object
40
41
42
43
|
# File 'lib/html/tablesection.rb', line 40
def unshift(obj)
expect(obj,Table::Row)
super
end
|