Class: Cure::Export::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/export/manager.rb,
lib/cure/validator/manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(named_range, validators) ⇒ Manager

Returns a new instance of Manager.



10
11
12
13
# File 'lib/cure/export/manager.rb', line 10

def initialize(named_range, processors)
  @named_range = named_range
  @processors = processors
end

Instance Attribute Details

#processorsObject (readonly)

Parameters:



8
9
10
# File 'lib/cure/export/manager.rb', line 8

def processors
  @processors
end

#validatorsObject (readonly)

Parameters:



8
9
10
# File 'lib/cure/validator/manager.rb', line 8

def validators
  @validators
end

Instance Method Details

#process_row(row) ⇒ Object

Parameters:

  • row (Hash)


16
17
18
# File 'lib/cure/validator/manager.rb', line 16

def process_row(row)

end

#with_processors {|@processors| ... } ⇒ Object

Yields:



15
16
17
18
19
20
21
# File 'lib/cure/export/manager.rb', line 15

def with_processors
  @processors.each(&:setup)

  yield @processors

  @processors.each(&:cleanup)
end