Skip to content

Commit 8707f75

Browse files
ekohlevgeni
authored andcommitted
Rewrite use_colors? for readability
1 parent 904f89d commit 8707f75

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/kafo/kafo_configure.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ def help(*args)
7777

7878
def use_colors?
7979
if config
80-
colors = config.app[:colors]
81-
else
82-
colors = ARGV.include?('--no-colors') ? false : nil
83-
colors = ARGV.include?('--colors') ? true : nil if colors.nil?
80+
config.app[:colors]
81+
elsif ARGV.include?('--no-colors')
82+
false
83+
elsif ARGV.include?('--colors')
84+
true
8485
end
85-
colors
8686
end
8787

8888
def preset_color_scheme

0 commit comments

Comments
 (0)