Created
January 17, 2012 22:25
-
-
Save Sporky023/1629390 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CURRENT | |
Cycle | |
can_receive_return? -> delegate | |
returned_product? -> delegate | |
receive_return -> delegate | |
decisions: | |
[Null] | |
Skip | |
can_receive_return? -> false | |
Rental | |
can_receive_return? -> depends | |
receive_return | |
outcome: | |
Purchase | |
can_receive? -> false | |
received? -> false | |
Return | |
can_receive? -> depends | |
received? -> bool | |
mark_as_received | |
User | |
can_receive_return? -> depends on cycle.decisions and outcomes | |
returned_current_product? -> depends on cycle, decisions, outcomes, and received? above | |
PROPOSED | |
Cycle | |
warehouse_could_receive_product? -> delegate | |
warehouse_received_product? -> delegate | |
warehouse_received_product! -> delegate | |
decisions: | |
Credit | |
warehouse_could_receive_product? -> false | |
Skip | |
warehouse_could_recieve_product? -> false | |
Rental | |
warehouse_could_receive_product? -> depends | |
warehouse_received_product! | |
outcome: | |
[NullOutcome] | |
waiting_for_warehouse_to_receive_product? -> true (?) not sure | |
warehouse_received_product? -> false | |
Purchase | |
waiting_for_warehouse_to_receive_product? -> false | |
warehouse_received_product? -> false | |
Return | |
waiting_for_warehouse_to_receive_product? -> depends | |
warehouse_received_product? -> depends | |
warehouse_received_product! | |
# and instead of methods on User ... | |
Returner.warehouse_could_receive_product_from?(user) | |
Returner.warehouse_has_received_product_from?(user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment