Turn double modifier into a single conditional

This commit is contained in:
Jack Nagel 2013-03-21 17:20:57 -05:00
parent 688ae72919
commit 21f566b662

View File

@ -34,13 +34,13 @@ class Tty
end end
def ohai title, *sput def ohai title, *sput
title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose? title = title.to_s[0, Tty.width - 4] if $stdout.tty? && !ARGV.verbose?
puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}" puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}"
puts sput unless sput.empty? puts sput unless sput.empty?
end end
def oh1 title def oh1 title
title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose? title = title.to_s[0, Tty.width - 4] if $stdout.tty? && !ARGV.verbose?
puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}" puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}"
end end