以åç§ã¯Rubyistã¯DRYçåç¾¤ã«æãã£ã¦ããã¨ããè¨äºãæ¸ããã Rubyistãã¡ã®DRYçå群ã¨ã®æ¦ã è¦ç´ããã¨DRYãããªãã³ã¼ããè¦ãã¨Rubyistã¯ã ãºã ãºããã¨ãã£ãå 容ã ã ååç§ãæ¸ããè¨äºã®ä¸ã«ã次ã®ãããªã³ã¼ããåºã¦ããã def run @methods.inject(@obj) do |mem, method| if custom = Filter.filters[method] custom.call(mem) else mem.send method end end end Rubyã§ãã¤ãã©ã¤ã³ï¼ ããã¯@methodsã«æ ¼ç´ããã¡ã½ããã@objã«å¯¾ãé æ¬¡å¼ã³åºãããååã®ãã£ã«ã¿ãFilter.filtersã«ããã®ãªããããcallãããã¨ãã£ãã³ã¼ãã§ããã ããªããé度ã®DRYçåç¾¤ã«æãã£ã¦ãããªãããã®ã³ã¼ããè¦ã¦ã ãºã ãºãã¦ããã«éã


{{#tags}}- {{label}}
{{/tags}}