added if-else eruby snippet