class HTML::Table::Foot
This class represents an HTML
table foot (<tfoot>). It is a subclass of Table::TableSection
. It is a singleton class.
Public Class Methods
create(arg = nil, &block)
click to toggle source
This is our constructor for Foot
objects because it is a singleton class. Optionally, a block may be provided. If an argument is provided it is treated as content.
# File lib/html/foot.rb, line 20 def self.create(arg = nil, &block) instance(arg, &block) end
instance(arg = nil, &block)
click to toggle source
Part of the singleton interface.
# File lib/html/foot.rb, line 26 def self.instance(arg = nil, &block) @instance ||= new(arg, &block) end
new(arg, &block)
click to toggle source
Called by create() instead of new(). This initializes the Foot
class.
Calls superclass method
HTML::Table::TableSection::new
# File lib/html/foot.rb, line 32 def initialize(arg, &block) @html_begin = '<tfoot' @html_end = '</tfoot>' super(&block) self.content = arg if arg end