Class Hirb::Helpers::Table::Resizer

  1. lib/hirb/helpers/table/resizer.rb
Parent: Object

Resizes a table’s fields to the table’s max width.

Methods

public class

  1. resize!

Public class methods

resize! (table)

Modifies field_lengths to fit within width. Also enforces a table’s max_fields.

[show source]
# File lib/hirb/helpers/table/resizer.rb, line 5
    def self.resize!(table)
      obj = new(table)
      obj.resize
      obj.field_lengths
    end