Class: HTML::Thead

Inherits:
Struct
  • Object
show all
Defined in:
lib/html/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



13
14
15
# File 'lib/html/table.rb', line 13

def data
  @data
end

Instance Method Details

#to_htmlObject



14
15
16
17
18
19
# File 'lib/html/table.rb', line 14

def to_html
  return "" unless data && data.respond_to?(:columns)
  Builder.build(data.columns) do |cols|
    tag(:thead, tr(cols))
  end
end