Method: Manager#column_format
- Defined in:
- lib/cless/cless.rb
#column_format(cols, fmt) ⇒ Object
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/cless/cless.rb', line 645 def column_format(cols, fmt) inc = @display.col_start if cols cols = cols.map { |x| x.to_i - inc } cols.delete_if { |x| x < 0 } if fmt && !fmt.empty? @data.set_format_column(fmt, *cols) else cols.each { |c| @data.unset_format_column(c) } end @data.refresh end cols = @data.formatted_column_list.sort.collect { |x| x + inc } "Formatted: " + cols.join(" ") end |