Class: Sheetah::SheetProcessor
- Inherits:
-
Object
- Object
- Sheetah::SheetProcessor
- Includes:
- Utils::MonadicResult
- Defined in:
- lib/sheetah/sheet_processor.rb
Constant Summary
Constants included from Utils::MonadicResult
Instance Method Summary collapse
- #call(*args, **opts) ⇒ Object
-
#initialize(specification) ⇒ SheetProcessor
constructor
A new instance of SheetProcessor.
Methods included from Utils::MonadicResult
Constructor Details
#initialize(specification) ⇒ SheetProcessor
Returns a new instance of SheetProcessor.
15 16 17 |
# File 'lib/sheetah/sheet_processor.rb', line 15 def initialize(specification) @specification = specification end |
Instance Method Details
#call(*args, **opts) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/sheetah/sheet_processor.rb', line 19 def call(*args, **opts) messenger = Messaging::Messenger.new result = Do() do Backends.open(*args, **opts) do |sheet| row_processor = build_row_processor(sheet, messenger) sheet.each_row do |row| yield row_processor.call(row) end end end handle_result(result, messenger) end |