diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-30 11:04:42 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-30 11:05:26 -0300 |
commit | 7a63996d6eaccbe403c724f40a771e4a48c7ea34 (patch) | |
tree | 588e0e6bf87678de6610e4a8dd8dcc0ba64056ef | |
parent | 66b8ece6560879a4e7d34dd6bd0cf20d48f3b3a7 (diff) | |
download | highline-7a63996d6eaccbe403c724f40a771e4a48c7ea34.tar.gz |
Remove unecessary conditional
-rw-r--r-- | examples/ansi_colors.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/ansi_colors.rb b/examples/ansi_colors.rb index 2a86e38..6986e72 100644 --- a/examples/ansi_colors.rb +++ b/examples/ansi_colors.rb @@ -14,14 +14,8 @@ colors = %w{black red green yellow blue magenta cyan white} # Using color() with symbols. colors.each_with_index do |c, i| say("This should be <%= color('#{c}', :#{c}) %>!") - if i == 0 - say( "This should be " + - "<%= color('white on #{c}', :white, :on_#{c}) %>!") - else - say( "This should be " + - "<%= color( '#{colors[i - 1]} on #{c}', - :#{colors[i - 1]}, :on_#{c} ) %>!") - end + say("This should be <%= color('#{colors[i - 1]} on #{c}', \ + :#{colors[i - 1]}, :on_#{c} ) %>!") end # Using color with constants. |