class Terminal::Table::Cell
Public Instance Methods
align(val, position, length)
click to toggle source
# 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