Class: Rgviz::Table
- Inherits:
-
Object
- Object
- Rgviz::Table
- Defined in:
- lib/rgviz/table.rb
Instance Attribute Summary collapse
-
#cols ⇒ Object
Returns the value of attribute cols.
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize ⇒ Table
constructor
A new instance of Table.
- #to_csv ⇒ Object
- #to_html ⇒ Object
Constructor Details
#initialize ⇒ Table
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
#cols ⇒ Object
Returns the value of attribute cols.
3 4 5 |
# File 'lib/rgviz/table.rb', line 3 def cols @cols end |
#rows ⇒ Object
Returns the value of attribute rows.
4 5 6 |
# File 'lib/rgviz/table.rb', line 4 def rows @rows end |
Instance Method Details
#to_csv ⇒ Object
11 12 13 |
# File 'lib/rgviz/table.rb', line 11 def to_csv CsvRenderer.render self end |
#to_html ⇒ Object
15 16 17 |
# File 'lib/rgviz/table.rb', line 15 def to_html HtmlRenderer.render self end |