Object
# File lib/table_print/formatter.rb, line 23 def initialize(width) self.width = width end
# File lib/table_print/formatter.rb, line 27 def format(value) padding = width - length(value.to_s) truncate(value) + (padding < 0 ? '' : " " * padding) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.