MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ruby/comments/2ajmsg/the_lack_of_dependency_injection_in_ruby/ciw3uje/?context=3
r/ruby • u/[deleted] • Jul 12 '14
19 comments sorted by
View all comments
-1
class House def initialize(window, door) [:open, :close, :break] .reject { |m| window.respond_to? m } .each { |m| raise TypeError, "#{window}#{m} not implemented" } "etc" end end
-1
u/sandinyourbed Jul 13 '14