Class: RubyXL::ColumnRange
Overview
Constant Summary
collapse
- DEFAULT_WIDTH =
9
Instance Method Summary
collapse
#==, #before_write_xml, included, #index_in_collection, #initialize, #write_xml
Instance Method Details
#delete_column(col_index) ⇒ Object
19
20
21
22
23
|
# File 'lib/rubyXL/objects/column_range.rb', line 19
def delete_column(col_index)
col = col_index + 1
self.min -=1 if min >= col
self.max -=1 if max >= col
end
|
#include?(col_index) ⇒ Boolean
31
32
33
|
# File 'lib/rubyXL/objects/column_range.rb', line 31
def include?(col_index)
((min-1)..(max-1)).include?(col_index)
end
|
#insert_column(col_index) ⇒ Object
25
26
27
28
29
|
# File 'lib/rubyXL/objects/column_range.rb', line 25
def insert_column(col_index)
col = col_index + 1
self.min +=1 if min >= col
self.max +=1 if max >= col - 1
end
|