class HTML::Table::ColGroup::Col
This class represents an HTML
ColGroup
column (<col>). Despite the name, it is not a subclass of ColGroup
or Table
.
Public Class Methods
indent_level()
click to toggle source
Returns the indentation level for the tags of this class. The default is 6.
# File lib/html/col.rb, line 28 def self.indent_level @indent_level end
indent_level=(num)
click to toggle source
Sets the indentation level for the tags of this class. The default is 6.
# File lib/html/col.rb, line 35 def self.indent_level=(num) expect(num, Integer) raise ArgumentError, 'num must be >= 0' if num < 0 @indent_level = num end
new(&block)
click to toggle source
Creates and returns a new ColGroup
object. Optionally takes a block. Note that it does not accept an argument - col tags do not have content.
# File lib/html/col.rb, line 18 def initialize(&block) @html_begin = '<col' @html_body = '' @html_end = '' instance_eval(&block) if block_given? end