Class: Cure::Extract::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/extract/filter.rb

Defined Under Namespace

Classes: ColumnHandler, RowHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFilter

Returns a new instance of Filter.



13
14
15
16
# File 'lib/cure/extract/filter.rb', line 13

def initialize
  @row_handler = RowHandler.new
  @col_handler = ColumnHandler.new
end

Instance Attribute Details

#col_handlerFilter::ColumnHandler (readonly)

Returns col_handler.

Returns:



11
12
13
# File 'lib/cure/extract/filter.rb', line 11

def col_handler
  @col_handler
end

#row_handlerFilter::RowHandler (readonly)

Returns row_handler.

Returns:



8
9
10
# File 'lib/cure/extract/filter.rb', line 8

def row_handler
  @row_handler
end

Instance Method Details

#columns(&block) ⇒ Object



18
19
20
21
22
# File 'lib/cure/extract/filter.rb', line 18

def columns(&block)
  return unless block

  @col_handler.instance_eval(&block)
end

#rows(&block) ⇒ Object



24
25
26
27
28
# File 'lib/cure/extract/filter.rb', line 24

def rows(&block)
  return unless block

  @row_handler.instance_eval(&block)
end