From b950966bdde86e6bc059d08c3b18852e369e09bb Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 16 Jul 2016 22:15:42 +0100 Subject: compat/hardware: cleanup style. --- Library/Homebrew/compat/hardware.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'Library/Homebrew/compat/hardware.rb') diff --git a/Library/Homebrew/compat/hardware.rb b/Library/Homebrew/compat/hardware.rb index 5c46a3d3c..07a63f048 100644 --- a/Library/Homebrew/compat/hardware.rb +++ b/Library/Homebrew/compat/hardware.rb @@ -1,32 +1,42 @@ module Hardware class << self - # We won't change the name because of backward compatibility. - # So disable rubocop here. - def is_32_bit? # rubocop:disable Style/PredicateName + def is_32_bit? + odeprecated "Hardware.is_32_bit?", "Hardware::CPU.is_32_bit?" !CPU.is_64_bit? end - # We won't change the name because of backward compatibility. - # So disable rubocop here. - def is_64_bit? # rubocop:disable Style/PredicateName + def is_64_bit? + odeprecated "Hardware.is_64_bit?", "Hardware::CPU.is_64_bit?" CPU.is_64_bit? end def bits + odeprecated "Hardware.bits", "Hardware::CPU.bits" Hardware::CPU.bits end def cpu_type + odeprecated "Hardware.cpu_type", "Hardware::CPU.type" Hardware::CPU.type end def cpu_family + odeprecated "Hardware.cpu_family", "Hardware::CPU.family" + Hardware::CPU.family + end + + def intel_family + odeprecated "Hardware.intel_family", "Hardware::CPU.family" + Hardware::CPU.family + end + + def ppc_family + odeprecated "Hardware.ppc_family", "Hardware::CPU.family" Hardware::CPU.family end - alias_method :intel_family, :cpu_family - alias_method :ppc_family, :cpu_family def processor_count + odeprecated "Hardware.processor_count", "Hardware::CPU.cores" Hardware::CPU.cores end end -- cgit v1.2.3