Method: Table::Row::Header#initialize

Defined in:
lib/html/header.rb

#initialize(arg = nil, &block) ⇒ Header

Creates and returns a new Header object. Optionally takes a block. If an argument is provided, it is treated as content.



18
19
20
21
22
23
24
# File 'lib/html/header.rb', line 18

def initialize(arg = nil, &block)
  @html_begin = '<th'
  @html_body  = ''
  @html_end   = '</th>'
  instance_eval(&block) if block_given?
  self.content = arg if arg
end