Ruby dependency inject utility