Class: EasyTable::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_table/builder.rb

Class Method Summary collapse

Class Method Details

.build(items, view, options = {}) {|table| ... } ⇒ Object

Yields:

  • (table)


3
4
5
6
7
8
# File 'lib/easy_table/builder.rb', line 3

def self.build(items, view, options = {})
  table = Base.new(items, options)
  yield table if block_given?
  table.presenter = Presenter.new(table, view)
  table.render
end