Sha256: 8369590915a802c7ad560fd386e0261ffcf35cad391083eac452ce950088ce7d

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

class Table < Tag
  include Thead
  include Tbody
  
  def initialize(values, params={})
    thead = build_head(values[0].keys, thead_params(params))
    tbody = build_body(values, tbody_params(params))
    super("table", "", params, [thead, tbody])
  end

  private
    def thead_params params
      params ? params.delete(:thead) : {}
    end

    def tbody_params params
      params ? params.delete(:tbody) : {}
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tablinate-1.2.3 lib/tablinate/table.rb