convert a Use Case scenario into code, give it to my ofﬁce mate with the scenario description, and ask him or her to desk check it. Today, after the polymorphism and object orientation of 1967, I can't do that. Our ability to reason about systems has been lost.” http://qconlondon.com/dl/qcon-london-2010/slides/JimO.Coplien_TheDCIArchitectureLeanAndAgileAtTheCodeLevel.pdf
= destination end def execute(amount) @source.transfer_to(@destination, amount) end module Transferrer def transfer_to(destination, amount) self.balance -= amount destination.balance += amount end end end Methodful Role
destination end ... class BarTransfer def initialize(source, destination) @source = source.extend(Transferrer) @destination = destination end ... class BazTransfer def initialize(source, destination) @source = source.extend(Transferrer) @destination = destination end ... module Transferrer extendable_by ‘Account’ ... end × Limits extending when class doesn’t comply with deﬁnition of the module.