From 8739eeab7d953e89a8c3e1fde16bd0b13563b01d Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 14 Jun 2013 11:56:33 -0700 Subject: [PATCH] Move pretty_name into MacOS::Version Closes Homebrew/homebrew#20507. Signed-off-by: Adam Vandenberg --- Library/Homebrew/macos.rb | 2 +- Library/Homebrew/os/mac/version.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 06215114cc..91c2050e8a 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -20,7 +20,7 @@ module MacOS extend self end def pretty_name - cat.to_s.split('_').map(&:capitalize).join(' ') + MacOS.version.pretty_name end def locate tool diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index c86974d768..c48b07eb62 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -13,5 +13,9 @@ module MacOS end super(Version.new(v)) end + + def pretty_name + @version.split('_').map(&:capitalize).join(' ') + end end end