if true ruby code example Example 1: ruby if statement if condition expression Example 2: ruby check if true if variable # true else # false