Re: Template Method Pattern (GoF) without abstract methods in Ruby
Michael Schwarze <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Greg, > Am 11.01.2019 um 11:09 schrieb Greg Navis <[email protected]>: > I personally do add "abstract" methods that raise errors. Great, so it’s not just examples in blog posts, but real. > It makes things more explicit than having being thrown NoMethodError in case I forget to implement it and makes it simple to identify which methods I need to implement/override in subclasses. Making your design decisions explicit by using these 'abstract‘ methods sounds like a good idea to me. > 2. Make a ReportGenerator class that accepts ReportRenderer as an argument. Will think about this and try it... Many thanks for your advice! Cheers, Michael Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE78Xb8K/0Nf8MzAJdI9hGZAGIlMEFAlw5DAIACgkQI9hGZAGI lMEBGxAA48WIt8Wx4OD2334YEk7RRtpKTZ+UN88o0R2oQqtleIroHmmbXYuoZhbf IHCmoVGdupEktWFRHWw+SIV1NONKNspFTo9Y0JrtQsk52XpZc7Tnabi0S1mQv3I3 eK5+mKaVEbigeGC8ej+hunIPjJtrVGTvD3MYfWiZLGpvAFG1Ta8JhmMVuMecvFWK DSjfX5eUhP6IdO4PcPy0MsPVnzGdRyLL8HgJ7+1hani2lH9DU2Z44/DG7N3yEEvA WPAEmw92wAx4V9/NYPCTdfhyStczPBFiizbIs1GuEJje4GT7yCzOf8Xd78HsaEZn RQT6Dr597dsZqndIiR1pcrVuVtN13XpQiipM93v4EoHQ05uKkdbxkMuT+4CiWuPX w3zfNBNe4aEluGLUlWjfDlgmVe+mCEuGky4Ghk9BAzfQhqz6TzhJXR5yXr/MvBYX AI3+Ay7id5CgyBgm808LicDY2klYOWAMU9mlFTXjLs28hLDEY1x3zYt0qozu7aoA vhk/8EcTVW2rdZ/6tgkagePpBqoJ5HUECYxxuhE76r199YHXefyo7/cE06ApnFG1 2JpqY8SSuQ1WgMK5jUg8ZRpsOp/4fwxkLdm40vNgjhWFG2A+EnXJdXMuxH1d1gjN 5i6V50o8BEq/LUUNQtLboTTBwZjqA156xL4dcFWRxL464kBHWjA= =peKq -----END PGP SIGNATURE-----