Class: Painless::Table
- Inherits:
-
Object
- Object
- Painless::Table
- Defined in:
- lib/painless-table/table.rb,
lib/painless-table/borderline.rb
Defined Under Namespace
Classes: Borderline
Instance Attribute Summary collapse
-
#cell_sizes ⇒ Object
readonly
Returns the value of attribute cell_sizes.
-
#heading ⇒ Object
readonly
Returns the value of attribute heading.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#separate_rows ⇒ Object
readonly
Returns the value of attribute separate_rows.
Instance Method Summary collapse
-
#initialize(parameters = {}) ⇒ Table
constructor
A new instance of Table.
- #to_s ⇒ Object
Constructor Details
#initialize(parameters = {}) ⇒ Table
Returns a new instance of Table.
7 8 9 10 |
# File 'lib/painless-table/table.rb', line 7 def initialize parameters={} @heading = parameters.fetch :heading, [] @objects = parameters.fetch :objects, [] end |
Instance Attribute Details
#cell_sizes ⇒ Object (readonly)
Returns the value of attribute cell_sizes.
5 6 7 |
# File 'lib/painless-table/table.rb', line 5 def cell_sizes @cell_sizes end |
#heading ⇒ Object (readonly)
Returns the value of attribute heading.
5 6 7 |
# File 'lib/painless-table/table.rb', line 5 def heading @heading end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
5 6 7 |
# File 'lib/painless-table/table.rb', line 5 def objects @objects end |
#separate_rows ⇒ Object (readonly)
Returns the value of attribute separate_rows.
5 6 7 |
# File 'lib/painless-table/table.rb', line 5 def separate_rows @separate_rows end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/painless-table/table.rb', line 12 def to_s draw_heading + draw_body end |