|def transfer amount|
|def transfer_out amount|
|raise "Insufficient funds" if balance < amount|
|update_log "Transferred out", amount|
|def transfer_in amount|
|update_log "Transferred in", amount|
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Not sure if I'm a fan of the roles accessing the context. It feels like a bit of a boundary issue to me and it's unnecessary. Why is
source_account.transfer_to(destination_account, amount) ... def transfer_to destination, amount ... destination.receive_from(self, amount) ... end
The other odd thing is both roles have the ContextAccssor mixin, but only one even uses it.