require 'daru/view'

Daru::View.table_library = :datatables

df = Daru::DataFrame.new({b: [11,12,13,14,15], a: [1,2,3,4,5],
      c: [11,22,33,44,55]},
      order: [:a, :b, :c],
      index: [:one, :two, :three, :four, :five])

dt_df =  Daru::View::Table.new(df, pageLength: 3)

dt_df.table.to_html

    table_opts = {
      class: "display",
      cellspacing: "0",
      width: "50%",
      table_html: "
      <thead>
            <tr>
                <th>Num1 </th>
                <th>Num2 </th>
                <th>Num3 </th>
            </tr>
        </thead>"
      }
    options = {
        table_options: table_opts
    }
html_code_dt_df = dt_df.table.to_html(id='table_id4', options)

IRuby.html html_code_dt_df