Re: dynamic loading and unloading of module
Robert Klemme <[email protected]> Sun, 18 Aug 2019 13:27:12 +0200
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <CAM9pMnMUYULTj+9VvytVuuxKULTjCmuMc4BvWYcSyy1duF+hMQ@mail.gmail.com> |
On Fri, Aug 16, 2019 at 1:10 PM Chris Roerig <[email protected]> wrote: > I wouldn’t use a module here. Sounds like the factory pattern might be a > better option. > I do not think so. To me this looks like an item that can play different roles at different times or gain capabilities and have them removed. Factory just allows variants for creation but then capabilities are fixed. Certainly you cannot remove something after creation with the factory pattern. Kind regards robert -- [guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can - without end} http://blog.rubybestpractices.com/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>