Method: Axlsx::FilterColumn#initialize
- Defined in:
- lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb
#initialize(col_id, filter_type, options = {}) {|@filter| ... } ⇒ FilterColumn
Note:
This class yields its filter object as that is where the vast majority of processing will be done
Creates a new FilterColumn object
19 20 21 22 23 24 25 26 |
# File 'lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb', line 19 def initialize(col_id, filter_type, = {}) RestrictionValidator.validate 'FilterColumn.filter', FILTERS, filter_type # Axlsx::validate_unsigned_int(col_id) self.col_id = col_id @filter = Axlsx.const_get(Axlsx.camel(filter_type)).new() yield @filter if block_given? end |