diff options
| author | Markus Reiter | 2016-08-30 21:38:13 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-01 20:00:49 +0200 |
| commit | 75e8b59aad4814112a53119f68ed629d60b3f97b (patch) | |
| tree | adca80e4cbeb07c208d9ea1b7b203bec653fb815 /Library/Homebrew/cask/lib/hbc/cli/info.rb | |
| parent | 6d8ee395fa5878282a1ce3975b632103448be042 (diff) | |
| download | brew-75e8b59aad4814112a53119f68ed629d60b3f97b.tar.bz2 | |
Add `Formatter` module.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/info.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/info.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/info.rb b/Library/Homebrew/cask/lib/hbc/cli/info.rb index e2f360296..0957ba4fd 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/info.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/info.rb @@ -18,9 +18,9 @@ module Hbc def self.info(cask) puts "#{cask.token}: #{cask.version}" - puts formatted_url(cask.homepage) if cask.homepage + puts Formatter.url(cask.homepage) if cask.homepage installation_info(cask) - puts "From: #{formatted_url(github_info(cask))}" if github_info(cask) + puts "From: #{Formatter.url(github_info(cask))}" if github_info(cask) name_info(cask) artifact_info(cask) Installer.print_caveats(cask) @@ -37,7 +37,7 @@ module Hbc puts versioned_staged_path.to_s .concat(" (") - .concat(versioned_staged_path.exist? ? versioned_staged_path.abv : "#{Tty.red}does not exist#{Tty.reset}") + .concat(versioned_staged_path.exist? ? versioned_staged_path.abv : Formatter.error("does not exist")) .concat(")") end else @@ -47,7 +47,7 @@ module Hbc def self.name_info(cask) ohai cask.name.size > 1 ? "Names" : "Name" - puts cask.name.empty? ? "#{Tty.red}None#{Tty.reset}" : cask.name + puts cask.name.empty? ? Formatter.error("None") : cask.name end def self.github_info(cask) |
