Closed
Description
In the BackgroundActivity core class, provide the following base methods:
def failed_items
def successful_items
def remaining_items
We already have the following helpful methods that can be used to implement them:
def selected_items_from_nil_messages
def selected_items_from_present_messages
def selected_items_from_messages_matching(regex)
These last three method should become protected, and the main methods of this issue (failed_items
, successful_items
and remaining_items
) will become the real interface.
Subclasses can overrride them or simply invoke the appropriate selected_items_* methods.
By default (because it's the most common situation), failed_items
will just invoke selected_items_from_present_messages
and successful_items
will invoke selected_items_from_nil_messages
.
The method remaining_items
is always just what's not yet processed, so the tail end of the items list.
- Add methods
- Adjust all subclasses, as necessary (only those that don't follow the "NIL message means success" convention)