Class: Nazar::BaseTable

Inherits:
Object
  • Object
show all
Defined in:
lib/nazar/base_table.rb

Direct Known Subclasses

HorizontalTable, VerticalTable

Instance Method Summary collapse

Constructor Details

#initialize(headers, cells) ⇒ BaseTable

Returns a new instance of BaseTable.



5
6
7
8
# File 'lib/nazar/base_table.rb', line 5

def initialize(headers, cells)
  @headers = headers
  @cells = cells
end

Instance Method Details

#add_summary(value) ⇒ Object



14
15
16
17
# File 'lib/nazar/base_table.rb', line 14

def add_summary(value)
  table << :separator
  table << summary_row(value)
end

#renderObject



10
11
12
# File 'lib/nazar/base_table.rb', line 10

def render
  table.render
end