Method: TableHelper::TableBuilder#head

Defined in:
lib/ical/table_builder.rb

#head(*args) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/ical/table_builder.rb', line 21

def head(*args)
  if block_given?
    concat(tag(:thead, options_from_hash(args), true))
    yield
    concat('</thead>')
  else
    @num_of_columns = args.size
    (:thead,
      (:tr,
        args.collect { |c| (:th, c.html_safe)}.join('').html_safe
      )
    )
  end
end