Class: HTML::Table::TableSection
- Inherits:
-
Array
- Object
- Array
- HTML::Table::TableSection
- Includes:
- Mixin::AttributeHandler, Mixin::HtmlHandler
- Defined in:
- lib/html/tablesection.rb
Overview
Superclass for THEAD, TBODY, TFOOT
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #[]=(index, obj) ⇒ Object
-
#content=(arg) ⇒ Object
Adds a Table::Row object as content.
-
#initialize(&block) ⇒ TableSection
constructor
A new instance of TableSection.
- #push(*args) ⇒ Object
- #unshift(obj) ⇒ Object
Methods included from Mixin::HtmlHandler
Methods included from Mixin::AttributeHandler
#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
#initialize(&block) ⇒ TableSection
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 |