Created
December 17, 2013 12:13
-
-
Save BRMatt/8004027 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DependencyInjection | |
def inject(subject, *deps) | |
deps.each do |dep| | |
subject.send(:"#{dep}=", send(dep)) | |
end | |
subject | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment