Class: Rgviz::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/rgviz/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTable

Returns a new instance of Table.



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

def initialize
  @cols = []
  @rows = []
end

Instance Attribute Details

#colsObject

Returns the value of attribute cols.



3
4
5
# File 'lib/rgviz/table.rb', line 3

def cols
  @cols
end

#rowsObject

Returns the value of attribute rows.



4
5
6
# File 'lib/rgviz/table.rb', line 4

def rows
  @rows
end

Instance Method Details

#to_csvObject



11
12
13
# File 'lib/rgviz/table.rb', line 11

def to_csv
  CsvRenderer.render self
end

#to_htmlObject



15
16
17
# File 'lib/rgviz/table.rb', line 15

def to_html
  HtmlRenderer.render self
end