class HTML::Table::Body

This class represents an HTML table body (<tbody>). It is a subclass of Table::TableSection.

Public Class Methods

end_tags=(bool) click to toggle source

Sets whether or not end tags are included for each Body object in the final HTML output. The default is true. Only true or false are valid arguments.

# File lib/html/body.rb, line 34
def self.end_tags=(bool)
  expect(bool, [TrueClass, FalseClass])
  @end_tags = bool
end
end_tags?() click to toggle source

Returns a boolean indicating whether or not end tags, </tbody>, are included for each Body object in the final HTML output. The default is true.

# File lib/html/body.rb, line 26
def self.end_tags?
  @end_tags
end
new(arg = nil, &block) click to toggle source

Returns a new Table::Body object. Optionally takes a block. If an argument is provided, it is treated as content.

Calls superclass method HTML::Table::TableSection::new
# File lib/html/body.rb, line 15
def initialize(arg = nil, &block)
  @html_begin = '<tbody'
  @html_end   = '</tbody>'
  super(&block)
  self.content = arg if arg
end