class HTML::Table::TableSection

Superclass for THEAD, TBODY, TFOOT

Public Class Methods

indent_level() click to toggle source
# File lib/html/tablesection.rb, line 25
def self.indent_level
  @indent_level
end
indent_level=(num) click to toggle source
# File lib/html/tablesection.rb, line 29
def self.indent_level=(num)
  expect(num, Integer)
  raise ArgumentError, 'indent_level must be >= 0' if num < 0
  @indent_level = num
end
new(&block) click to toggle source
Calls superclass method
# File lib/html/tablesection.rb, line 12
def initialize(&block)
  super
  instance_eval(&block) if block_given?
end

Public Instance Methods

[]=(index, obj) click to toggle source
Calls superclass method
# File lib/html/tablesection.rb, line 35
def []=(index, obj)
  expect(obj, Table::Row)
  super
end
content=(arg) click to toggle source

Adds a Table::Row object as content. The arg is passed as the value to the Table::Row constructor.

# File lib/html/tablesection.rb, line 20
def content=(arg)
  tr = Table::Row.new(arg)
  push(tr)
end
push(*args) click to toggle source
Calls superclass method
# File lib/html/tablesection.rb, line 40
def push(*args)
  args.each { |obj| expect(obj, Table::Row) }
  super
end
unshift(obj) click to toggle source
Calls superclass method
# File lib/html/tablesection.rb, line 45
def unshift(obj)
  expect(obj, Table::Row)
  super
end