Module: GreenPepper::CollectionHandler
- Defined in:
- lib/greenpepper/example/collectionexample.rb
Defined Under Namespace
Classes: CollectionIgnoredResult, CollectionMissingResult, CollectionSuccessResult, CollectionSurplusResult
Constant Summary collapse
- SUCCESS_HANDLER =
handler CollectionSuccessResult
- SURPLUS_HANDLER =
handler CollectionSurplusResult
- MISSING_HANDLER =
handler CollectionMissingResult
- IGNORE_HANDLER =
handler CollectionIgnoredResult
- NO_OP_HANDLER =
lambda {}
- ERROR_HANDLER =
lambda do |results, row, row_index| row.each_with_index do |value, col_index| if col_index == 0 if value.is_a? Exception result = WriteExceptionExampleResult.new(value) else result = WriteTextExampleResult.new(value) end else if value.is_a? Exception result = WriteExceptionExampleResult.new value, true else result = WriteTextExampleResult.new value, true end end results.add row_index + FIRST_DATA_ROW, col_index, result end end