Class: Terminal::Table::Cell
- Inherits:
-
Object
- Object
- Terminal::Table::Cell
- Defined in:
- lib/terminal/table/cell.rb
Instance Method Summary collapse
Instance Method Details
#align(val, position, length) ⇒ Object
5 6 7 8 9 |
# File 'lib/terminal/table/cell.rb', line 5 def align(val, position, length) # positions = { :left => :ljust, :right => :rjust, :center => :center } positions = { left: :mb_ljust, right: :mb_rjust, center: :mb_center } val.public_send(positions[position], length) end |