Class: TextLayout::Table::Cell

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

Direct Known Subclasses

Span

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attrObject

Returns the value of attribute attr



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

def attr
  @attr
end

#colObject

Returns the value of attribute col



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

def col
  @col
end

#rowObject

Returns the value of attribute row



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

def row
  @row
end

Instance Method Details

#heightObject



20
21
22
# File 'lib/text_layout/table.rb', line 20

def height
  attr[:value].size
end

#widthObject



16
17
18
# File 'lib/text_layout/table.rb', line 16

def width
  attr[:value].map(&:display_width).max
end