Class: HTML::Table

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



5
6
7
# File 'lib/html/table.rb', line 5

def data
  @data
end

Instance Method Details

#to_htmlObject



6
7
8
9
10
# File 'lib/html/table.rb', line 6

def to_html
  Builder.build(data) do |data|
    tag(:table, thead(data) + tbody(data))
  end
end