Module: SpreadsheetArchitect::AxlsxColumnWidthPatch
- Included in:
- Axlsx::Col
- Defined in:
- lib/spreadsheet_architect/monkey_patches/axlsx_column_width.rb
Instance Method Summary collapse
Instance Method Details
#initialize(*args) ⇒ Object
5 6 7 8 |
# File 'lib/spreadsheet_architect/monkey_patches/axlsx_column_width.rb', line 5 def initialize(*args) @width = nil super end |
#width=(v) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/spreadsheet_architect/monkey_patches/axlsx_column_width.rb', line 10 def width=(v) if v.nil? @custom_width = false @width = nil elsif @width.nil? || @width < v+5 @custom_width = true @best_fit = true @width = v + 5 else @custom_width = true @width = v end end |