`if rsync_remote.include?('GIT_BRANCH')` would be more idiomatic here. Welcome to Ruby, where there are a thousand ways to do everything and the right way depends on who you ask!