Class: TextLayout::Table::Cell
- Inherits:
-
Struct
- Object
- Struct
- TextLayout::Table::Cell
- Defined in:
- lib/text_layout/table.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attr ⇒ Object
Returns the value of attribute attr.
-
#col ⇒ Object
Returns the value of attribute col.
-
#row ⇒ Object
Returns the value of attribute row.
Instance Method Summary collapse
Instance Attribute Details
#attr ⇒ Object
Returns the value of attribute attr
15 16 17 |
# File 'lib/text_layout/table.rb', line 15 def attr @attr end |
#col ⇒ Object
Returns the value of attribute col
15 16 17 |
# File 'lib/text_layout/table.rb', line 15 def col @col end |
#row ⇒ Object
Returns the value of attribute row
15 16 17 |
# File 'lib/text_layout/table.rb', line 15 def row @row end |
Instance Method Details
#height ⇒ Object
20 21 22 |
# File 'lib/text_layout/table.rb', line 20 def height attr[:value].size end |
#width ⇒ Object
16 17 18 |
# File 'lib/text_layout/table.rb', line 16 def width attr[:value].map(&:display_width).max end |